I want to to select all records from a table where a field is not null or is not a zero length string.
SELECT * From tblTable Where fldFieldName = <<what goes here>>
thanks
Printable View
I want to to select all records from a table where a field is not null or is not a zero length string.
SELECT * From tblTable Where fldFieldName = <<what goes here>>
thanks
select * from table where field <> "" or 0
hope thats what you wanted...
Does the zero indicate a Null value?
if the field data type is integer then you use 0 for null, if its a text field you use two quotes, "".
NULLQuote:
Originally posted by MasterGoon
if the field data type is integer then you use 0 for null, if its a text field you use two quotes, "".
The Null value indicates that the variable contains
no valid data.
Null is not the same as Empty,whic indicates that a variable
has not yet been initialized.
It is also not the same as a zero-length string (""), which
is sometimes referred to as a null string.
Use the IssNull to determine wheter an expression contain
a Null value.
Cheers
Ray
SELECT * From tblTable Where fldFieldName IS NULL
OR fldFieldName = ''
or use this...
SELECT * From tblTable Where NOT fldFieldName IS NULL
or fldFieldName = ''
Hope, it helps... MAJA.