Forms4.5 Question about CURSOR and DECODE
From: Buergi Josef <josef.buergi_at_ascom.ch>
Date: 12 Nov 1998 16:06:25 GMT
Message-ID: <01be0e56$68855f20$4b7d4f8b_at_rac17217.hasler.ascom.ch>
Hello
Date: 12 Nov 1998 16:06:25 GMT
Message-ID: <01be0e56$68855f20$4b7d4f8b_at_rac17217.hasler.ascom.ch>
Hello
[Quoted] I have a big problem about the following cursor in a Forms Procedure:
CURSOR par_cur (kkey_p NUMBER, sorting_p CHAR) IS SELECT d.indx, capdesc, p.support, p.rinfo,
d.constat, d.status, d.ref, p.note FROM pics_param_def d, pics_cust_par p, pics_source s WHERE d.indx = p.indx AND kkey = kkey_p AND d.source = s.source AND p.id = id_p AND p.release = release_p AND (s.v51_flag = v51_p OR s.v52_flag = v52_p) ORDER BY DECODE (sorting_p , 'JN', d.v51_nr, 'NJ', d.v52_nr, 'JJ',d.nr);
The sort order should be driven from sorting_p !
I try to open it with OPEN par_cur(1,'JN'). And it does not work !!
But - If I do the follwoing line in the Cursor (for example)
ORDER BY DECODE ('JN' , 'JN', d.v51_nr, 'NJ', d.v52_nr, 'JJ', d.nr);
it works fine.
Why can I not pass a variable to the cursor ????
Any help is welcome .......
Regards
Joseph
josef.buergi_at_ascom.ch Received on Thu Nov 12 1998 - 17:06:25 CET