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 -> Re: sqlplus beginner question

Re: sqlplus beginner question

From: Luiz da Silva <big57arf_at_optonline.com>
Date: Tue, 12 Sep 2000 00:47:14 GMT
Message-ID: <m2fv5.12517$En.1884557@news02.optonline.net>

To run a file with more than one SQL statement at the prompt type:

@filename

if the file has the extension ".sql" you don't need to add the extension, if it has a different extension, then you will need to type it, i.e.:

@filename.txt

Hope this helps,

Lou

"Jorge Adriano" <cc9803_at_mat.uc.pt> wrote in message news:8o6k9v$8ag$2_at_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 Mon Sep 11 2000 - 19:47:14 CDT

Original text of this message

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