Re: how to put multiple select in a run.sql file?

From: <newsman_at_noone.C0M>
Date: Thu, 05 Sep 2002 04:10:36 GMT
Message-ID: <6250897.oXAHRhlgNA_at_heron>


David Johnson wrote:

>>> sqlplus user/user_at_dbRacedat < run.sql

> try
> sqlplus user/user_at_dbRacedat @run.sql
>
> either the ; or / will work, but / has to be the first char on the line if
> it is used.
>
> i.e.
> select * from dual;
> or
> select * from dual
> /

This is different enough from the original advice that I'm not surprised it didn't work. It makes sense.

> also
> select * from dual;
> /
> will actually run the query twice!!

Well that's non-intuitive, but interesting. Will have to put away for a later day.

>
> the / is required to run plsql anonymous blocks.
> except when using the exec directive.
>
> i.e.
> declare
> x number(2);
> begin
> x := 0;
> x:=x+1;
> dbms_output.put_line(x);
> end;
> /
>
> exec myprocedure( 'one' );

Interesting. Received on Thu Sep 05 2002 - 06:10:36 CEST

Original text of this message