Re: Grrr! How do you make sqlplus exit on a syntax error!

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Fri, 11 Oct 2002 09:06:29 +0100
Message-ID: <3da68686$0$1286$ed9e5944_at_reading.news.pipex.net>


[Quoted] [Quoted] "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message news:3DA5BE71.87C125DF_at_exesolutions.com...
> I'll try again.
>
> What's wrong with:
>
> BEGIN
> ... your SQL statement here
> ... your SQL statement here
> ... your SQL statement here
> END;
> /
>
> Seems to me the functionality requested already exists. Just wrap BEGIN
and END
> around your SQL.

[Quoted] Sqlplus scripts do not necessarily just consist of sql

SQL> begin
  2 set echo off
  3 execute immediate 'select sysdate from dual';   4 end;
  5 /
 set echo off

            *
ERROR at line 2:
ORA-06550: line 2, column 6:
PL/SQL: ORA-00922: missing or invalid option ORA-06550: line 2, column 2:
PL/SQL: SQL Statement ignored

SQL>

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Fri Oct 11 2002 - 10:06:29 CEST

Original text of this message