Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Running packaged procedures from a sql script
Tracy Bashore wrote:
> I am trying to use a package that someone built and can run it from the
> sqlplus command line but when I try running it from a start file, it
> does not work. The example that I am running looks like this:
>
> begin
> ops.go(ops.project_ra('nfl_team_season_stats','t_name, t_season',
> '1996_stats'));
> end;
>
> I get a list of error messages as a result of this. The first one is
> pointing at the begin statement and says that a left parenthesis is
> expected. ops is the name of the package. Any help would be
> appreciated.
Hi Tracy,
There isn't really a lot to go on with what you've posted. On the face of
it the syntax looks OK, but it's difficult to be sure without knowing how
the ops pacakge is defined. The parameter 't_name, t_season' looks a tad
suspicious.
It would help it you could do the follwing;
desc ops.go;
and
desc ops.project_ra;
and send me the results. You also mention that you can run the package from the command line - it would be interesting to see how you are doing this e.g. if ops.go is a function:-
select ops.go(etc......) ............... etc. would work whereas in PL/SQL you would need;
declare
outcome <return_variable_type>;
begin
outcome := ops.go(etc......);
end;
rather than the syntax you provide, which is OK is ops.go is a procedure.
Hope this helps,
Ian Received on Thu Dec 11 1997 - 00:00:00 CST