Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calling An Oracle Procedure
"MChristy" <mchristy433_at_yahoo.com> a écrit dans le message de
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
You didn't declare the variables you used in procedure call. Have a look at:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch6.htm#1007557 http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1014308
-- Regards Michel CadotReceived on Fri Nov 05 2004 - 11:18:00 CST
![]() |
![]() |