Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Forms45 Question about CURSOR and DECODE
Hello
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);
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 ????
Regards
Joseph
josef.buergi_at_ascom.ch Received on Thu Nov 12 1998 - 10:07:13 CST
![]() |
![]() |