×
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

Selecting Null Values in SQL Statement

Selecting Null Values in SQL Statement

Selecting Null Values in SQL Statement

(OP)
I have a field in a record that is defined as a 4 byte date in the ddf's.  How do I select records that donot contain any information in the field?  Are they nulls?

RE: Selecting Null Values in SQL Statement

put this condition in the where clause of your sql statement...

WHERE yourfield IS NOT NULL

-DNG

RE: Selecting Null Values in SQL Statement

Actually, it depends on your how the field is defined as well as what's actually in the field.  
- When were these tables/DDFs created?  
- Do they have a "True Null" byte?  
- The IS NOT NULL may work unless the engine doesn't see the values as NULL.
- What do these empty dates look like in the PCC?
- What do these empty dates look like in the Function Executor (byte values)?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

RE: Selecting Null Values in SQL Statement

(OP)
is null and is not null both work fine.

When the ddf's were originally created for this table, the  flag 'nullable' was not checked.  This morning I changed the definition to 'nullable' = y and reloaded the data into the table.  I don't know if that made any difference or not.

When you look at this field in the PCC, the fields either show a date string or nothing.  I havn't looked at them in the function executor.

Thanks for the help.

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