Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

About SELECT INTO command in a store procedure

4 posts in Product Futures Discussion Last posting was on 2002-03-27 00:47:12.0Z
Ryan_Chen Posted on 2002-03-08 09:33:40.0Z
From: Ryan_Chen
Date: Fri, 8 Mar 2002 04:33:40 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: About SELECT INTO command in a store procedure
Message-ID: <E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:733
Article PK: 94261

I wrote the "SELECT INTO" command in a store procedure.
Ex:(A segment of the store procedure)
select a.bymonth,a.sa,a.sa_name,a.ws,a.wsnm,b.wsgroup,b.wsgname,
a.tot,a.es0,a.es2,a.es3,a.es6,a.others,a.ttv,a.av
into #temp2
from #temp1 a,wstb b
where a.ws *= b.ws

drop table #temp1

(There are 6 similar segments in the store procedure)

when I previewed it in the DataWindow editor of PowerBuilder7,it was
normal!
But,When I ran it with PB client(application .exe) or used non-visual
object,it failed.

DB error code : 226
message : SELECT INTO command not allowed within multi-statement
transaction.

please tell me ,how about I can do to solve the problems?


John Pallister Posted on 2002-03-27 00:47:12.0Z
Reply-To: "John Pallister" <johnp@netlogic.com.au>
From: "John Pallister" <johnp@netlogic.com.au>
References: <E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums>
Subject: Re: About SELECT INTO command in a store procedure
Date: Wed, 27 Mar 2002 10:47:12 +1000
Lines: 35
Organization: Network Logic
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <KQJTGIS1BHA.206@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 61.88.130.34
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:607
Article PK: 94135

Turn on Autocommit within the application. Check the DBParm

--
*****************************************************
John Pallister

Network Logic
ph: 9687-8800, mailto:johnp@netlogic.com.au
******************************************************

<Ryan_Chen> wrote in message
news:E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums...
> I wrote the "SELECT INTO" command in a store procedure.
> Ex:(A segment of the store procedure)
> select a.bymonth,a.sa,a.sa_name,a.ws,a.wsnm,b.wsgroup,b.wsgname,
> a.tot,a.es0,a.es2,a.es3,a.es6,a.others,a.ttv,a.av
> into #temp2
> from #temp1 a,wstb b
> where a.ws *= b.ws
>
> drop table #temp1
>
> (There are 6 similar segments in the store procedure)
>
> when I previewed it in the DataWindow editor of PowerBuilder7,it was
> normal!
> But,When I ran it with PB client(application .exe) or used non-visual
> object,it failed.
>
> DB error code : 226
> message : SELECT INTO command not allowed within multi-statement
> transaction.
>
> please tell me ,how about I can do to solve the problems?


Néstor Marcel Sánchez Ahumada Posted on 2002-03-10 09:24:10.0Z
From: "Néstor Marcel Sánchez Ahumada" <trieste@entelchile.net>
References: <E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums>
Subject: Re: About SELECT INTO command in a store procedure
Date: Sun, 10 Mar 2002 05:24:10 -0400
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <VKNzBYByBHA.318@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: as5300-s24-013.cnt.entelchile.net 164.77.122.23
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:704
Article PK: 94232

I think you can't do that because your application started a transaction.
(at least in Sybase 11.3 you can't use SELECT INTO within a transaction)

<Ryan_Chen> escribió en el mensaje
news:E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums...

> I wrote the "SELECT INTO" command in a store procedure.
> Ex:(A segment of the store procedure)
> select a.bymonth,a.sa,a.sa_name,a.ws,a.wsnm,b.wsgroup,b.wsgname,
> a.tot,a.es0,a.es2,a.es3,a.es6,a.others,a.ttv,a.av
> into #temp2
> from #temp1 a,wstb b
> where a.ws *= b.ws
>
> drop table #temp1
>
> (There are 6 similar segments in the store procedure)
>
> when I previewed it in the DataWindow editor of PowerBuilder7,it was
> normal!
> But,When I ran it with PB client(application .exe) or used non-visual
> object,it failed.
>
> DB error code : 226
> message : SELECT INTO command not allowed within multi-statement
> transaction.
>
> please tell me ,how about I can do to solve the problems?


RMrazek Posted on 2002-03-15 13:13:38.0Z
From: "RMrazek" <reinhold.mrazek@adidas.de>
References: <E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums> <VKNzBYByBHA.318@forums.sybase.com>
Subject: Re: About SELECT INTO command in a store procedure
Date: Fri, 15 Mar 2002 14:13:38 +0100
Lines: 37
Organization: adidas-Salomon AG
X-Newsreader: Microsoft Outlook Express 4.72.2120.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0
Message-ID: <f0zt6QCzBHA.206@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: gate211.hq.adidas.de 62.128.7.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:664
Article PK: 94191

Could this be in conjunction with the PB "autocommit" setting? As far as I
understood this in earlier PB versions (5.x...) this had to do with the
Sybase chained mode for transactions , thus opening a new transaction
bracket after each commit.

Néstor Marcel Sánchez Ahumada wrote in message ...
>I think you can't do that because your application started a transaction.
>(at least in Sybase 11.3 you can't use SELECT INTO within a transaction)
>
><Ryan_Chen> escribió en el mensaje
>news:E9B27B21F5EF44320034856E85256B76.003485A085256B76@webforums...
>> I wrote the "SELECT INTO" command in a store procedure.
>> Ex:(A segment of the store procedure)
>> select a.bymonth,a.sa,a.sa_name,a.ws,a.wsnm,b.wsgroup,b.wsgname,
>> a.tot,a.es0,a.es2,a.es3,a.es6,a.others,a.ttv,a.av
>> into #temp2
>> from #temp1 a,wstb b
>> where a.ws *= b.ws
>>
>> drop table #temp1
>>
>> (There are 6 similar segments in the store procedure)
>>
>> when I previewed it in the DataWindow editor of PowerBuilder7,it was
>> normal!
>> But,When I ran it with PB client(application .exe) or used non-visual
>> object,it failed.
>>
>> DB error code : 226
>> message : SELECT INTO command not allowed within multi-statement
>> transaction.
>>
>> please tell me ,how about I can do to solve the problems?
>
>