Re: How to execute Oracle stored procedures within Squirrel SQL ?

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 27 Dec 2005 14:14:30 -0500
Message-ID: <qMCdnebl1vELDyzeRVn-vQ_at_comcast.com>


"stonecoldsteve" <opensesame_at_gmail.com> wrote in message news:1135709390.008154.264630_at_g43g2000cwa.googlegroups.com...
> Hi all
>
> How to execute Oracle stored procedures from within Squirrel SQL.
>
> I know "exec <sp_name>" works in SQL Plus.
>
> Thanks
> Steve
>

don't know what Squirrel SQL is, but...

'exec' is a SQL*Plus command which is a shortcut for an anonymous procedure -- that's why error messages (unhandled exceptions) look like this:

SQL> exec some_procedure
BEGIN some_procedure; END;

      *
ERROR at line 1:

ORA-06550: line 1, column 7:
PLS-00201: identifier 'SOME_PROCEDURE' must be declared
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

the actual syntax to execute a stored procedure from any environment that can pass SQL to the database is usually to wrap the stored procedure call in an anonymous block, aka:

BEGIN some_procedure; END;

++ mcs Received on Tue Dec 27 2005 - 20:14:30 CET

Original text of this message