Hello!
How are you executing the command? Looks like each DELETE gets send
individually to your database.
I don't have access to a Squirrel installation at the moment but IIRC
there is a command to run all selected code in one piece.
HTH and best regards,
Dennis Benzinger
Am 07.03.2013 16:01, schrieb urbanmojo:
> Hi:
>
> I am using Squirrel as the client tool using JDBC RAC driver against Oracle
> 11.1. I am trying to replace an existing Oracle procedure with:
>
> CREATE OR REPLACE PROCEDURE MY_PROC
> AS
> BEGIN
> DELETE FROM table1 WHERE IEX_DATE >= (select max(idate) from table1) - 20;
> DELETE FROM table2 WHERE IEX_DATE >= (select max(idate) from table2) - 20;
> DELETE FROM table3 WHERE IEX_DATE >= (select max(idate) from table3) - 20;
> DELETE FROM table4 WHERE IEX_DATE >= (select max(idate) from table4) - 20;
> END;
>
> It fails with the error:
> Query 1 of 5, Rows read: 0, Elapsed time (seconds) - Total: 0.047, SQL
> query: 0.047, Building output: 0
> 6,326 Row(s) Deleted
> Query 2 of 5, Rows read: 0, Elapsed time (seconds) - Total: 0.672, SQL
> query: 0.672, Building output: 0
> 12,097 Row(s) Deleted
> Query 3 of 5, Rows read: 0, Elapsed time (seconds) - Total: 1.25, SQL query:
> 1.25, Building output: 0
> 5,040 Row(s) Deleted
> Query 4 of 5, Rows read: 0, Elapsed time (seconds) - Total: 0.531, SQL
> query: 0.531, Building output: 0
> Error: ORA-00900: invalid SQL statement
>
> SQLState: 42000
> ErrorCode: 900
> Error occured in:
> END
> What am I doing wrong? I've tried different things but nothing seems to give
> me an executable procedure.
>
>
>
> --
> View this message in context: http://squirrel-sql-client.10976.n7.nabble.com/Can-t-create-Oracle-Procedure-in-Squirrel-tp3082.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Squirrel-sql-users mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>
|