Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL help

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
I have a form with an Adodc control and a DataGrid.
If I setup the Adodc for SELECT * FROM tbClaim it lists all the records so I know it works but I need this WHERE statement

SELECT * FROM tblClaim WHERE AppraiserLastName IS NOT NULL AND DateClosed = NULL

When I use the above it returns no records although there are many records that meet the criteria so something is wrong with the statement. I get no errors at all just no records

Any help would be appreciated.

 
You can't use = NULL, you have to use IS NULL.
I would rewrite your query as:

SELECT * FROM tblClaim WHERE NOT (AppraiserLastName IS NULL) AND DateClosed IS NULL

Hope that helps.
 
Thanks cj44 worked like a charm :)

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top