Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: IS NOT NULL


Message #1 by naz_2401@h... on Thu, 22 Aug 2002 05:17:51
Thanks Rik Kiela.
==========================================================================
> This is not good.
A>  SELECT statement returns the records which validate the given criteria 
i> n the WHERE clause.

> In your example :

> SELECT * FROM table1 WHERE field1 IS NOT NULL OR
f> ield2 IS NOT NULL OR field3 IS NOT NULL OR field4
I> S NOT NULL OR field5 IS NOT NULL

> If field1 is Null and field2 is Not Null the validation is True because 
of 
t> he OR statement, so it will show the record.

> In the next example:

> SELECT * FROM table1 WHERE field1 IS NOT NULL AND
f> ield2 IS NOT NULL AND field3 IS NOT NULL AND field4
I> S NOT NULL AND field5 IS NOT NULL

> If field1 is Null and field2 is Not Null the validation is False because 
o> f the AND statement, so it will not show the record.

==========================================================================
Yes, I would like to do as you stated below. The problem is, the reports 
will be from the same table which make them (the reports) difficult to 
build as the sql statement is done in the command object (the table) 
property. So I can't make more than 1 sql statement. 

Anyway, thanks for the tips.
==========================================================================

> When you want to show only fields who are Not Null in different reports, 
y> ou better make for each report a different SQL-statement.

> Your Welcome,

> Rik Kiela

  Return to Index