Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calling An Oracle Procedure
Hi,
you cannot exec a procedure from sqlplus that return OUT parameter.
This is done for prevent using function or procedure with OUT or REFERENCE
parameter
inside SQL commands.
D.
"MChristy" <mchristy433_at_yahoo.com> ha scritto nel messaggio
news:53143d38.0411050904.2e8309c9_at_posting.google.com...
> Hope someone can help. I'm new to Oracle/PL/Sql and more or less I am
> following the examples in the book. I wrote a small procedure listed
> below but I am having trouble with the syntax when trying to call the
> procedure. The procedure compiled successfully but yet when I issue
> the following command from the PL/SQL Developer Command window I get
> this error ORA-01008: not all variables bound. Hope someone can help
> and maybe give me a few tips.
>
> Thanks,
> Mike...
>
> exec trmjc.testcursor(703233004,:p_accountnumber, :p_comment)
>
>
> create or replace
> procedure TestCursor(
> p_propertyid in contracts.mpropertyid%TYPE,
> p_accountnumber out contracts.maccountnumber%TYPE,
> p_comment out contracts.mcomment%TYPE
> ) AS
> v_contractrec contracts%rowtype;
> Cursor c_contracts is
> SELECT mpropertyid, maccountnumber, mcomment
> FROM contracts
> WHERE contracts.mpropertyid = p_propertyid;
>
> begin
> open c_contracts;
> for v_contractRec in c_contracts loop
> fetch c_contracts into v_contractrec;
> exit when c_contracts%notfound;
>
> p_accountnumber := v_contractRec.Maccountnumber;
> p_comment := v_contractRec.Mcomment;
> end loop;
> close c_contracts;
>
> end TestCursor;
>
> SQL> exec trmjc.testcursor(703233004,:p_accountnumber, :p_comment)
>
> begin trmjc.testcursor(703233004,:p_accountnumber, :p_comment); end;
>
> ORA-01008: not all variables bound
Received on Fri Nov 05 2004 - 11:19:13 CST
![]() |
![]() |