If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Test for null?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-01, 22:42
wolfgang
Guest
 
Posts: n/a
Unhappy Test for null?

This ought to be easy, but I've been driving myself nuts with it...

I have a select statement that goes:
Code:
select template_name from agenda where group_name='"+group_ID+"' and meeting_date=null
which gives me all template names from the given group_ID, completely ignoring the meeting_date field.

I tried various permutations on 'null', "null", "", '', etc, but those would "blow up" the page TEST (none of the jsp stuff would show up, as it was stuck in a loop)

If you have a suggestion on how to select for all rows where a given field is null, I'd love to hear it... please e-mail that info to wolfgang<at>deathsdoor<dot>com

Regards,
Ron
Reply With Quote
  #2 (permalink)  
Old 04-12-01, 02:29
Robi
Guest
 
Posts: n/a
Code:
select template_name 
  from agenda 
  where group_name='"+group_ID+"' 
    and meeting_date is null
Reply With Quote
  #3 (permalink)  
Old 04-12-01, 09:47
Alan Shein
Guest
 
Posts: n/a
Try "is null" instead of "= null". Two different things altogether. You do not have a value that reads "null" (the actual characters making up the word, "null"), but you do have NULL values (values that have no value).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On