Re: Oracle Enterprise Manager / SQL*Plus and Stored Procedures....

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 18 Nov 2004 18:28:03 +0100
Message-ID: <cng1oc$8f4$1_at_news2.zwoll1.ov.home.nl>


Mike wrote:

> Hopefully this is the correct place for this question, I'm new to Oracle
> (and the Oracle newsgroups). I need to run a stored procedure to insert some
> missing records. All I know how to do (so far) is run SQL statements in
> SQL*Plus (starting SQL*Plus) from the Enterprise manager.
> The stored procedure is
> TimeETLAdd (
> tcID number,
> resID number,
> tcResID number,
> tlDate1 varchar2,
> setDays number,
> hrs number,
> holidaySet number,
> dispID number,
> fromTCAdd number,
> adjTime number,
> newID OUT number)
>
> I made a few guesses as to how to run a stored procedure from SQL*Plus
> Call TimeETLAdd(11524, 452,452,'13-Aug-2004',0,0,2192,0,0,10)
> Call TimeETLAdd(11524, 452,452,'13-Aug-2004',0,0,2192,0,0,10,'')
>
> Anyway, the long and the short of it is all my guesses erred.
> Can I run a SP from SQL*Plus ?
> How do I account for the OUT paramater ?
>
> Thanks,
> Mike
>
>

_at_timeetladd(your params seem correct) is the way to start a stored procedure from disk (atucally: working directory and SQL search path).
If not from your disk, you can 'exec timeetladd(params)' (no quotes),
which is shorthand for:
begin
  timeetladd(params);
end;
/

Your out param in SQL*Plus can be handled by defining it beforehand:
var n number
exec timeetladd(IN_params, :n)
print n

Notice the semicolon on the out param when calling the procedure

-- 

Regards,
Frank van Bortel
Received on Thu Nov 18 2004 - 18:28:03 CET

Original text of this message