Results 1 to 3 of 3

Thread: Test for null?

  1. #1
    wolfgang Guest

    Unhappy Answered: 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

  2. Best Answer
    Posted by Robi

    "
    Code:
    select template_name 
      from agenda 
      where group_name='"+group_ID+"' 
        and meeting_date is null
    "


  3. #2
    Robi Guest
    Code:
    select template_name 
      from agenda 
      where group_name='"+group_ID+"' 
        and meeting_date is null

  4. #3
    Alan Shein Guest
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •