Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to call store procedure in SQL*Plus
A copy of this was sent to matthew_so_at_my-dejanews.com
(if that email address didn't require changing)
On Mon, 26 Apr 1999 12:35:30 GMT, you wrote:
>Hi all,
> I have written a stored procedure in Oracle. [proc(abc in out varchar2)]
>The stored procedure will take the same parameter as in and out. However, how
>can i call the procedure in SQL*PLUS.
>I know that it should call below line
>
>var in_para char(100)
>execute proc(:in_para)
>
var in_para char(100)
exec :in_para :='123'
exec proc(:in_para)
print :in_para
for example:
1 create or replace procedure proc( x in out char )
2 as
3 begin
4 x := '456';
5* end;
SQL> /
Procedure created.
SQL> var in_para char(100)
SQL> exec :in_para :='123'
PL/SQL procedure successfully completed.
SQL> exec proc(:in_para)
PL/SQL procedure successfully completed.
SQL> print :in_para
IN_PARA
beware of CHAR unless you understand the blank padded comparision semantics...
>But, how can i assign the value '123' to the in_para??? Just
>in_para:='123'???? Not work!!
>
>Thanks a lot!
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities