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

Home -> Community -> Usenet -> c.d.o.server -> Re: Sqlplus: Blank lines in @-included script?

Re: Sqlplus: Blank lines in @-included script?

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Thu, 16 Sep 1999 13:35:07 GMT
Message-ID: <37e3f12c.1983027@netnews.worldnet.att.net>


You can't include a blank line in your SQL statement. You must do:

select sysdate
from dual;

However, if you have SQL*Plus 8.1 (shipped wiht the 8i release), you can do:

set sqlblanklines on
select sysdate

from dual;

Normally though, a blank line signifies the end of a statement. SQL*Plus then interprets your "from dual" as a new statement, and spits back an error messag.

Jonathan



jonathan_at_gennick.com
http://gennick.com
Brighten the Corner Where You Are

On Mon, 06 Sep 1999 10:36:09 +0200, Ole Christian Meldahl <konocm_at_statoil.com> wrote:

>Hi
>
>How can I avoid Sqlplus from assuming that the command is finished when
>I include a file with @ or @@?
>
>file test:sql contains
>select sysdate
>
>from dual
>/
>--- EOF---
>
>Then in Sqlplus:
>
>SQL> @test
>SQL> select sysdate
> 2
>SQL> from dual
>unknown command "from dual" - rest of line ignored.
>SQL> Input truncated to 1 characters
>/
>select sysdate
> *
>ERROR at line 1:
>ORA-00923: FROM-nøkkelord ble ikke funnet i forventet posisjon
>
>ole c
>
>
Received on Thu Sep 16 1999 - 08:35:07 CDT

Original text of this message

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