PL/SQL cursor problems
Date: 24 Oct 1994 12:42:50 GMT
Message-ID: <38ga4a$5m2_at_newsgate.dircon.co.uk>
Maybe someone can enlighten me about something which seems like a very strange feature of PL/SQL.
The following query works fine when I submit it using SQL*Plus, or some such tool:
select a.transaction_iwid,to_number(c.ln_no)
from ar_transaction_b a,trans_iwid_upd b,loader.isales_unique c
where (a.transaction_iwid,a.update_id) =
((b.transaction_iwid,b.maxupd))
and (a.transaction_ref,a.data_source_code) =
((rpad(c.ar_ivc_no,20),rpad(c.data_sor,5)))
However, if I define a cursor based on this query in a stored procedure, Oracle throws up an error when I compile the procedure. It compiles fine if I change it to this:
cursor add_line_c1 is
select a.transaction_iwid,to_number(c.ln_no)
from ar_transaction_b a,trans_iwid_upd b,loader.isales_unique c
where a.transaction_iwid=b.transaction_iwid
and a.update_id = b.maxupd and a.transaction_ref = rpad(c.ar_ivc_no,20) and a.data_source_code = rpad(c.data_sor,5)
In general, it won't allow me to declare any cursor which has a WHERE clause which includes an element of the type (a,b) = ((c,d)).
I thought one could base a cursor on any valid SQL SELECT statement?
I'm using Oracle 7.0.16 on Netware 3.12.
Any help greatly appreciated! Please address mail replies to
hharriso_at_madge.com
Thanks...
Henry Harrison Received on Mon Oct 24 1994 - 13:42:50 CET