-
Nov 15th, 2000, 09:54 PM
#1
Thread Starter
Addicted Member
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
Shawn Hull
VB6, SP3 (Professional Edition)
-
Nov 15th, 2000, 11:23 PM
#2
Lively Member
easy as pie :)
select * from table where field <> "" or 0
hope thats what you wanted...
-
Nov 15th, 2000, 11:26 PM
#3
Thread Starter
Addicted Member
Does the zero indicate a Null value?
Shawn Hull
VB6, SP3 (Professional Edition)
-
Nov 15th, 2000, 11:27 PM
#4
Lively Member
kinda
if the field data type is integer then you use 0 for null, if its a text field you use two quotes, "".
-
Nov 16th, 2000, 05:38 AM
#5
Fanatic Member
Re: kinda
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, "".
NULL
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
-
Nov 16th, 2000, 07:29 AM
#6
Junior Member
ANSWER...
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.
VB and Java are great - ja, so ist es !! To my software programming site: http://www.majasoft-games.de .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|