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

Home -> Community -> Usenet -> c.d.o.tools -> sqlplus beginner question

sqlplus beginner question

From: Jorge Adriano <cc9803_at_mat.uc.pt>
Date: Fri, 25 Aug 2000 21:16:28 +0100
Message-ID: <8o6k9v$8ag$2@venus.telepac.pt>

Hi, I've just started working with SQL Plus. I'm using win2000 (I would rather use Linux, but was only able to get the winNT version) :(

Anyway, I'm having some trouble running SQL scripts from within SQLPlus. I can't run scripts (or buffers) with more than one command.

If I have a file, say 'test.sql' with:

select * from emp;
select * from ;

I can run it from command prompt by doing sqlplus name/password @test.sql, and it works properly, that is, it runs the two queries.

But if I'm in SQL Plus and I open the file, it gets transfered to the buffer, and it says it truncates the 2nd line (it removes the last ';') Then I type 'RUN' and I get



SQL> run
  1 select * from emp;
  2* select * from dept
select * from emp;
                 *

ERRO na linha 1:
ORA-00911: caracter inválido

Obs: I got the portuguese version, the last two lines mean: ERROR in line 1:
ORA-00911: invalid char.

However if I only type one query, it works properly. I also tryed using '/' instead of 'RUN' but I was only able to run one statement, the only difference was that I had to remove the ';' at the end of the querie.

So, what I wanted to know is, how can I run a file with more than statment on it.
The only way I could do it so far was by using copy/paste.

Thanks in advance
J.A. Received on Fri Aug 25 2000 - 15:16:28 CDT

Original text of this message

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