Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: passing several columns into single array using RETURNING clause in java
Tanel,
You can use CallableStatement to call the following anonymous block. Based on Anthony's example
declare
l_array emp_array;
begin
update emp set sal=3D9999 where deptno=3D?
returning emp_obj(rowid,empno,ename,sal) bulk collect into l_array;
open ? for select * from table(cast(l_array as emp_array)); end;
And bind the two variables.
Will this work for you?
Richard Ji
-----Original Message-----
From: Anthony Molinaro [mailto:amolinaro_at_wgen.net] Sent: Tue 8/3/2004 11:26 AM To: oracle-l_at_freelists.org Cc:=09 Subject: RE: passing several columns into single array using RETURNING =clause in java=20
-----Original Message-----
From: Tanel P=3DF5der [mailto:tanel.poder.003_at_mail.ee]=3D20
Sent: Tuesday, August 03, 2004 10:30 AM
To: oracle-l_at_freelists.org
Subject: Re: passing several columns into single array using RETURNING =
=3D
clause in java=3D20
Thanks Anthony!
Is there a way to do this with a single update called from JDBC, without =
=3D
PL/SQL as well? I know it's possible with OCI, but I'm not that familiar =
=3D
with Java, so maybe anyone of you can give me some pointers...
Thanks,
Tanel.
> Tanel, > > I'd use a callable statement. Also, I'm assuming later on in =the=3D20
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Aug 03 2004 - 12:26:20 CDT
![]() |
![]() |