Question

Locked

Unable to EXECUTE Stored Procedure

By nivinkg ·
This is the syntax I used to execute a procedure. I am using SQL devoloper

variable r refcursor;
variable v VARCHAR2(100);
exec P_GET_ATRB_DTL1('1223~24314~314')

There is 1 IN parameters and 3 OUT parameters of which one is of type sysrefcursor(OUT parameter).Is there any error in the syntax.

When I am executing the procedure SQL devoloper is giving the
error code

ORA-00900: invalid SQL statement

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

You need to cover all the parameters

by marv732 In reply to Unable to EXECUTE Stored ...

and use a PL/SQL anonymous block if you are going to run this on its own.
You will need something like:

declare
r_out refcursor;
v_out varchar2(100);
x_out varchar2(100);
y_in varchar2(64) := '1234~24314~314';
begin
p_get_atrb_dtl1(y_in, r_out,v_out,x_out);
-- do whatever you need to do with the out
-- parameters here
end;
/

The order of parameters needs to be what the procedure is expecting of course.

I suggest you also look at http://www.oracle.com/technology (Oracle Tech Net) as there are a lot of forums, tutorials and sample code here for Oracle developers and DBAs.
You should also get hold of some PL/SQL programming books which will be a big help to you - they certainly were for me when I worked as a developer full-time.

HTH
Greg

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums