Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: calling stored procedures using dynamic sql

Re: calling stored procedures using dynamic sql

From: David John Hazledine <djh_at_cix.compulink.co.uk>
Date: 1997/01/14
Message-ID: <E40s0u.CC8@cix.compulink.co.uk>#1/1

Off the top of my head, perhaps you need to format the code as a complete PL/SQL block:

strcpy (sqlcommand, "begin calldemo.test_proc end");

I would imagine that EXECUTE IMMEDIATE expects to find a legal SQL stmnt there, and "calldemo.test_proc" wouldn't be treated as legal.

> I want to call a stored procedure using proC and dynamic SQL. But I get
> the error "ORA-00900: invalid SQL statement" returned...know
>
> strcpy (sqlcommand, "calldemo.test_proc");
> EXEC SQL EXECUTE IMMEDIATE :sqlcommand;
Received on Tue Jan 14 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US