Select on a null, with multiple tables

Dan Lambshead dlambshe at milk.org
Thu Feb 11 13:43:07 CST 2010


Hello,
 
  I just noticed something strange converting to Oracle 8, using Powerhouse
8.40.D1, when selecting a null value in one table, where multiple tables are
involved. It doesn't seem to work ! Either I have to limit the SELECT to
just that table with the null, or code an additional  statement "SELECT
file IF field IS NULL"  for that table.   Or I can use a define setting it
to 0 when that field is null and use the define in the select.  So I have
the work arounds, but just curious what's going on ?
 
ie.
 
Access Oracle_table_1 &
  Link to Oracle_table_2 opt
 
Select if field of Oracle_table_1 = "Y" and &
  field of Oracle_table_2 IS NULL
 
Doesn't work, Will always return 0 records  !!
 
But the following will work and return some records
 
1) Select if field of Oracle_table_2 IS NULL
 
2) Select if field of Oracle_table_1 = "Y"
    Select Oracle_table_2 if field of Oracle_table_2 IS NULL
 
3) DEFINE D_FIELD  =  field of Oracle_table_2 &
        IF NOT field of Oracle_table_2 IS NULL  ELSE 0
    
    Select if field of Oracle_table_1 = "Y" and & 
     D_FIELD = 0
 
   (This will work for me since the field is actually a date type which
cannot be 0 in the first place
 
 
Thanks
 
Dan
    

 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20100211/b4d4a7e6/attachment.htm 


More information about the powerh-l mailing list