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: Problem executing file with more than one statement in SqlPlus

Re: Problem executing file with more than one statement in SqlPlus

From: RedRiver <instruct_at_zaz.com.br>
Date: Wed, 15 Sep 1999 00:34:04 -0300
Message-ID: <7rn3k2$5f6$1@srv4-poa.zaz.com.br>

<svedloff_at_ix.netcom.com> escreveu nas notícias de mensagem:37de9651.10921083_at_nntp.ix.netcom.com...
> I am using Personal Oracle 8 and I am having problem executing a file
> with more than one SQL statement in SqlPlus. My file looks like this:
>
> delete from Event;
> insert into Event (EventID, EventType) values(1, 'test');
> insert into Event (EventID, EventType) values(2, 'test');
>
> When i execute it I get this:
>
> SQL>
> 1 delete from Event;
> 2 insert into Event (EventID, EventType) values(1, 'test');
> 3* insert into Event (EventID, EventType) values(2, 'test');
> 4 /
> delete from Event;
> *
> ERROR at line 1:
> ORA-00911: invalid character
>
>
> SQL>
>
> The '/' on line 4 I ahd to enter by myself. Also, the astetisk above
> the ERROR statement showed up directly underneath the semicolon.
>
> I also tried this file:
>
> delete from Event;
> /
> insert into Event (EventID, EventType) values(1, 'test');
> /
> insert into Event (EventID, EventType) values(2, 'test');
> /
>
> And I got the same probelm.
>
>

Hi,

You can try your latest solution, but without the ';' at the end of the commands.
Also issue 'set cmdsep on ;'. This will force SQLPlus recognize the ';' as "end of command".

Hope that helps.

Nilo (npaim_at_zaz.com.br) Received on Tue Sep 14 1999 - 22:34:04 CDT

Original text of this message

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