Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with having more than 1 statement in SqlPlus
Hey S,
If you are in the editor for SqlPlus I don't believe it will work. Try the following instead (assuming the file is in your starting directory):
SQL> @mydata.sql
So, if you are on an NT machine and the file is in a C:\sql directory you would type:
SQL> @c:\sql\mydata.sql
Jay!!!
svedloff_at_ix.netcom.com wrote:
> I am using Personal Oracle 8, and I am ahvign probelm with having
> more than 1 SQL statement in SqlPlus.
>
> I have a file, called mydata.sql, that looks like this:
>
> delete from Event;
> insert into Event (EventID, EventType) values(1, 'test');
> insert into Event (EventID, EventType) values(2, 'test');
>
> When i run it in SqlPlus, I get the following:
>
> SQL>
> 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 had to enter myself. The asterisk showed up
> directly under the semicolon on the line above it.
>
> I also tried putting '/' after each line, and I got the same problem:
>
> delete from Event;
> /
> insert into Event (EventID, EventType) values(1, 'test');
> /
> insert into Event (EventID, EventType) values(2, 'test');
> /
Received on Tue Sep 14 1999 - 13:46:34 CDT
![]() |
![]() |