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: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1997/01/15
Message-ID: <BM0EHFAQnK3yEwJo@jimsmith.demon.co.uk>#1/1

In article <5besme$cks_at_aknews1.netlink.net.nz>, Andrew Holman <akdh_at_ihug.co.nz> writes
>I want to call a stored procedure using proC and dynamic SQL. But I get
>the error "ORA-00900: invalid SQL statement" returned. Does anyone know if
>this is possible or do I have to use embedded SQL.
>
>I have tried calling a stored procedure which takes no parameters using
>method 1 i.e
>
>strcpy (sqlcommand, "calldemo.test_proc");
>EXEC SQL EXECUTE IMMEDIATE :sqlcommand;
>

I think you have to include it in a PL/SQL block, so -

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

is probably what you want.

-- 
Jim Smith
Received on Wed Jan 15 1997 - 00:00:00 CST

Original text of this message

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