Re: how to update a table with a value from Stored procedure
Date: Fri, 7 Nov 2008 05:51:28 +0100
<emdproduction_at_hotmail.com> a écrit dans le message de news: 445d59e2-a75e-4308-b194-a162552bfcbe_at_1g2000prd.googlegroups.com...
| Dear Group,
| We have a third party supplied package which we do not want to change.
| I would like to update a table with a value from the procedure. I can
| use PL/SQL to do that. But our tool does not support PL/SQL, i have
| to use SQL.
| Something like
| SQL> var res varchar2(30)
| SQL> exec test_procedure(res);
| SQL> update my_table set col1=:res where ...
| But our application does not even support that. I have to do
| something like
| SQL>update my_table set col = (:test_procedure)
| or something like
| SQL>update my_table set col =(select :test_procedure from dual);
| Anyway we can make this into one SQL?
| Thanks very much
Create a function that calls the procedure and returns the out parameter of the procedure, then you can use it in update.
Michel Received on Thu Nov 06 2008 - 22:51:28 CST