From: swapnakrishnan2k on
I am trying to use an exec statement to run a script on Dbvisualizer.
However, I get this error

exec test1.sql

11:27:53 [EXEC - 0 row(s), 0.000 secs] [Error Code: 900, SQL State:
42000] ORA-00900: invalid SQL statement
.... 1 statement(s) executed, 0 row(s) affected, execution time 0.000
sec

I'm sure the sql statement in the script is not the problem cause it
runs when i run it seperately.

Could somebody help me ?

From: Sybrand Bakker on
On 7 Sep 2005 10:45:23 -0700, swapnakrishnan2k(a)gmail.com wrote:

>I am trying to use an exec statement to run a script on Dbvisualizer.
>However, I get this error
>
>exec test1.sql
>
> 11:27:53 [EXEC - 0 row(s), 0.000 secs] [Error Code: 900, SQL State:
>42000] ORA-00900: invalid SQL statement
>... 1 statement(s) executed, 0 row(s) affected, execution time 0.000
>sec
>
>I'm sure the sql statement in the script is not the problem cause it
>runs when i run it seperately.
>
>Could somebody help me ?

execute is a *sqlplus* statement. It is also nothing more than
begin <procedure name>; end;
/

--
Sybrand Bakker, Senior Oracle DBA
From: swapnakrishnan2k on
Hi,

Thanks. Is there a way for me to execute scripts from within a script
that do not use sqlplus statements ?

Thanks,
Swapna

From: Syltrem on
<swapnakrishnan2k(a)gmail.com> a ýcrit dans le message de
news:1126121331.748971.98420(a)f14g2000cwb.googlegroups.com...
> Hi,
>
> Thanks. Is there a way for me to execute scripts from within a script
> that do not use sqlplus statements ?
>
> Thanks,
> Swapna
>

As Sybrand said...

BEGIN
your statements here;
END;
/

and if you've got only one query, don't bother with begin and end... just
use the query text

--
Syltrem

http://pages.infinit.net/syltrem (OpenVMS related web site, en franýais)



From: Noel on
U|ytkownik swapnakrishnan2k(a)gmail.com napisaB:

> I am trying to use an exec statement to run a script on Dbvisualizer.
> However, I get this error
>
> exec test1.sql

Instead of this above try to use sqlplus @test1.sql from command prompt.
Since you didn't mention an Oracle Client version i can' say if name of
executable is sqlplus, plus73 or plus80 for run sql plus program.

--
Noel