Multiple statement query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple statement query

Thushar

Hi all,

 

Begin work;

Select * from myTable ;

commit work

 

Why am I not getting any results when I execute this statements in Adhoc?

 

Please reply ..

 

G R Thushar

Reply | Threaded
Open this post in threaded view
|

RE: Multiple statement query

Thomas Brodt
IIRC, Ad hoc sql can only execute single statements, not scripts with
multiple statements in a sequence.

If you split your command into two and execute them separatedly, it should
work.

first execute :
Select * from myTable ;

then
commit work

HTH
Thomas

> -----Original Message-----
> From: Thushar [mailto:[hidden email]]
> Sent: Friday, June 30, 2006 11:31 AM
> To: 'vwnc'
> Subject: Multiple statement query
>
> Hi all,
>
>  
>
> Begin work;
>
>
>
> commit work
>
>  
>
> Why am I not getting any results when I execute this
> statements in Adhoc?
>
>  
>
> Please reply ..
>
>  
>
> G R Thushar
>
>

Reply | Threaded
Open this post in threaded view
|

Antwort: RE: Multiple statement query

ICS.Manz
Be careful with splitting up a transaction:
As far as I remember the Ad Hoc SQL Tool uses auto-commit,
i.e. whenever you press "execute" you perform a single committed
transaction.
There is a hint in the method comment comment for
DatabaseConnection>>begin.

Best regards

Traude Manz
ICS AG

[hidden email] schrieb am 30.06.2006 11:47:37:

> IIRC, Ad hoc sql can only execute single statements, not scripts with
> multiple statements in a sequence.
>
> If you split your command into two and execute them separatedly, it
should

> work.
>
> first execute :
> Select * from myTable ;
>
> then
> commit work
>
> HTH
> Thomas
>
> > -----Original Message-----
> > From: Thushar [mailto:[hidden email]]
> > Sent: Friday, June 30, 2006 11:31 AM
> > To: 'vwnc'
> > Subject: Multiple statement query
> >
> > Hi all,
> >
> >
> >
> > Begin work;
> >
> >
> >
> > commit work
> >
> >
> >
> > Why am I not getting any results when I execute this
> > statements in Adhoc?
> >
> >
> >
> > Please reply ..
> >
> >
> >
> > G R Thushar
> >
> >
>