Apr 10, 2002 #1 seb2 Technical User Feb 6, 2002 27 US Having problems with SQL for pulling all records where 'completed_date' NOT NULL. Select* from table where table.complete_date = NOT NULL; or where table.complete_date = ''; Neither seems to work. What am I missing?
Having problems with SQL for pulling all records where 'completed_date' NOT NULL. Select* from table where table.complete_date = NOT NULL; or where table.complete_date = ''; Neither seems to work. What am I missing?
Apr 10, 2002 #2 carrr Technical User Sep 10, 2001 3,543 US Try running your first query without the = in front of NOT NULL Upvote 0 Downvote
Apr 10, 2002 #3 sunaj Technical User Feb 13, 2001 1,474 DK Hi, try: Select * from MyTable where NOT table.complete_date IS NULL; ps. I just tested your other question about BETWEEN. It works for me: Select * from tblstation where not [datetime] between '01/01/97' AND '01/01/02' Sunaj 'The gap between theory and practice is not as wide in theory as it is in practice' Upvote 0 Downvote
Hi, try: Select * from MyTable where NOT table.complete_date IS NULL; ps. I just tested your other question about BETWEEN. It works for me: Select * from tblstation where not [datetime] between '01/01/97' AND '01/01/02' Sunaj 'The gap between theory and practice is not as wide in theory as it is in practice'
Apr 10, 2002 #4 tlbroadbent MIS Mar 16, 2001 9,982 US The proper syntax for checking NULLs is ... IS NULL or IS NOT NULL Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions. Upvote 0 Downvote
The proper syntax for checking NULLs is ... IS NULL or IS NOT NULL Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
Apr 10, 2002 #5 carrr Technical User Sep 10, 2001 3,543 US tlbroadbent is right on with the IS NOT NULL. My apologies. Upvote 0 Downvote
Apr 10, 2002 Thread starter #6 seb2 Technical User Feb 6, 2002 27 US Thanks everyone!!!! Upvote 0 Downvote