HELP !!...problem with NOT NULL fields in where ..FORMS 3.0
From: Venkatesh Nakkala <nakkala_at_cs.tamu.edu>
Date: 24 Feb 1993 17:56:27 GMT
Message-ID: <1mgcsbINN7kg_at_tamsun.tamu.edu>
Date: 24 Feb 1993 17:56:27 GMT
Message-ID: <1mgcsbINN7kg_at_tamsun.tamu.edu>
Howdy Everyone out there,
I have this problem with the WHERE part of the ORDERING clause for a Block..the entry in the .inp file looks like this ORDERING <<< where key_1 = :blkname.key_1 and key_2 = :blkname.key_2 and possibly_null_fld = :blkname.possibly_null_fld
>>>
....The problem is when I do an execute_query on this block, I get all the records that match the key_1 and key_2 and that's it..it wont take the third part of the where condition into account at all. This happens even in update statements with similar Where clauses...when fields can be NON- NULL and are included in the where condition. I dont want to redefine the execute-trigger to do a select and put two selects with an If statement to check for NULL. What do I need to do here ?.....there should be a better way that to need 2 update statements with an if then else statement.... if ( :blkname.filed1 IS NULL ) then select check_type,date_checked,fresh_attacked, into :blkname.check_type, :blkname.date_checked, :blkname.fresh_attacked, from spb_checking where k1 = :blkname.k1 and k2 = :blkname.k2 and filed1 IS NULL end if; if (:blkname.filed1 IS NOT NULL ) then select check_type,date_checked,fresh_attacked, into :blkname.f1, :blkname.f2, :blkname.f3, from spb_blk where k1 = :blkname.k1 and k2 = :blkname.k2 and filed1 = :blkname.filed1 end if; Hope I've made myself clear, Thanks in Advance, Venkatesh Nakkala
-- ----------------------------------------------------------------------------- Venkatesh Nakkala nakkala_at_cs.neuron.tamu.edu Off : (409)845-5481 Res : (409)268-7404 Dept. Of Comp Sci.,Texas A & M Univ. Fax : (409)847-8578Received on Wed Feb 24 1993 - 18:56:27 CET