×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Records with NULL Data Excluded from Query

Records with NULL Data Excluded from Query

Records with NULL Data Excluded from Query

(OP)
Hi,

I have a query like the following:

TABLE FILE PROJECTS
PRINT
PROJECT_NUMBER
WHERE PROJECT_NUMBER EQ '1234'
WHERE (STAT_CD NE '201')
END

Suppose there is one record in table PROJECTS where PROJECT_NUMBER = '1234', and STAT_CD is NULL for that record.

The above query will not qualify the record properly, ie, 0 records are returned.

But if I change the second WHERE clause to
WHERE (STAT_CD NE '201' OR STAT_CD IS MISSING)
then my query returns the record.

My question is....
Is there a global setting whereby my original query would return the record. I don't want to have to add the part 'OR STAT_CD IS MISSING' explicitly to my query.

Thanks!
Sean

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close