Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Resident load where field is not null

Hi,

I'm trying to restrict a resident load to where a particular field is null.

I've tried

RESIDENT TableName

WHERE NOT FieldToCheck IS NULL;

But this didn't work.

I can't do the restriction in the sql load statement, since I need the cases where the field is null to be present in another resident load.

Any help would be appreciated.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Perhaps try something like:

Resident TableName

Where Len(FieldToCheck)>0;

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Perhaps try something like:

Resident TableName

Where Len(FieldToCheck)>0;

Not applicable
Author

Worked great thanks.

Anonymous
Not applicable
Author

Why not do this:

Resident TableName

WHERE not IsNull(FieldToCheck);

I believe the "IsNull" function is less expensive than the "Len" function.

Anonymous
Not applicable
Author

Hey Jeff,

That should give the same result and might cost less as you say.

The reason that me, and several others are hooked on the len() function is that there used to be a difference.. back in early QV 8 if I remember correctly, where the results from IsNull() varied based on your platform (32 vs 64 bit) while len() was consistent.

These days, IsNull() should be the easier option.

Cheers,

Johannes

Igoresz
Contributor II
Contributor II

where IsNull(num([field]))=0

😉