🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Clint Clark Tue, 18 Jul 2006 19:56
Error running query when field value is NULL
#309
Author: Clint Clark
Date: Tue, 18 Jul 2006 19:56
16 lines
1333 bytes
I am having trouble running a query on a table if one of my selected fields 
contains a NULL value.
Example:

    Select * from ItemNonInventory

If any of the fields in that table contain a null value I get an E_FAIL 
error.

Anyone got an idea as to why this happens?

One other question I have is, Is it possible to write a query that looks for 
anyfield that contains null?
This way I can query only records with valid data.

Thanks 
Re: Error running query when field value is NULL
#310
Author: Mark Guerrieri
Date: Wed, 19 Jul 2006 15:41
8 lines
1140 bytes
> One other question I have is, Is it possible to write a query that looks 
> for anyfield that contains null?
> This way I can query only records with valid data.

select * from sometable s where s.field1 is not null and s.field2 is not 
null ...

Mark 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads