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.

ASA 9.0.2 build 2542 (help, maybe it's a bug)

6 posts in General Discussion Last posting was on 2004-12-24 16:13:30.0Z
Ernikas Posted on 2004-12-20 07:07:38.0Z
From: "Ernikas" <Ernikas@xxx.lt>
Newsgroups: ianywhere.public.general
Subject: ASA 9.0.2 build 2542 (help, maybe it's a bug)
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: c1.edrana.lt
Message-ID: <41c67a36@forums-2-dub>
X-Original-Trace: 19 Dec 2004 23:07:34 -0800, c1.edrana.lt
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 19 Dec 2004 23:07:35 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 19 Dec 2004 23:07:38 -0800
X-Trace: forums-1-dub 1103526458 10.22.108.75 (19 Dec 2004 23:07:38 -0800)
X-Original-Trace: 19 Dec 2004 23:07:38 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3994
Article PK: 7885

Hi,

Please check this script:

=============================
begin
declare @a integer;
create table #temp(numeris integer);
select 2 into @a;
insert into #temp(numeris) select @a+number(*) from sys.sysprocedure
group by creator;
select * from #temp
end

=============================

Thanks
Ernikas
From Lithuania


Breck Carter [TeamSybase] Posted on 2004-12-20 14:00:13.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: ASA 9.0.2 build 2542 (help, maybe it's a bug)
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <lemds0l9jkp64kiqakaqpcftij071k73i7@4ax.com>
References: <41c67a36@forums-2-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 20 Dec 2004 06:00:13 -0800
X-Trace: forums-1-dub 1103551213 64.7.134.118 (20 Dec 2004 06:00:13 -0800)
X-Original-Trace: 20 Dec 2004 06:00:13 -0800, bcarter.sentex.ca
Lines: 66
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3996
Article PK: 7887

It seems to be intermittent; i.e., when I dbinit a new 9.0.2.2542
database, it returns the wrong result the first time, but is OK the
second time I run it.

It seems to have something to do with NUMBER(*) in an expression.

One workaround is to apply the NUMBER(*) in a subsequent UPDATE:

begin
declare @a integer;
create table #temp(numeris integer);
select 2 into @a;
insert into #temp(numeris) select @a from sys.sysprocedure
group by creator;
update #temp set numeris = numeris + number(*);
select * from #temp
end;

I'm guessing that in the real world, you might want an ORDER BY on the
UPDATE... but maybe not.

You could also apply the @a later:

begin
declare @a integer;
create table #temp(numeris integer);
select 2 into @a;
insert into #temp(numeris) select number(*) from sys.sysprocedure
group by creator;
update #temp set numeris = numeris + @a;
select * from #temp
end;

Breck

On 19 Dec 2004 23:07:38 -0800, "Ernikas" <Ernikas@xxx.lt> wrote:

>Hi,
>
>Please check this script:
>
>=============================
>begin
>declare @a integer;
>create table #temp(numeris integer);
>select 2 into @a;
>insert into #temp(numeris) select @a+number(*) from sys.sysprocedure
>group by creator;
>select * from #temp
>end
>
>=============================
>
>Thanks
>Ernikas
>From Lithuania
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com


StupidBird Posted on 2004-12-20 15:10:12.0Z
Sender: 32c2.41c6e954.1804289383@sybase.com
From: StupidBird
Newsgroups: ianywhere.public.general
Subject: Re: ASA 9.0.2 build 2542 (help, maybe it's a bug)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41c6eb54.32db.1681692777@sybase.com>
References: <lemds0l9jkp64kiqakaqpcftij071k73i7@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 20 Dec 2004 07:10:12 -0800
X-Trace: forums-1-dub 1103555412 10.22.241.41 (20 Dec 2004 07:10:12 -0800)
X-Original-Trace: 20 Dec 2004 07:10:12 -0800, 10.22.241.41
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3998
Article PK: 7889

Hi,

Breck, thnx for suggestion, but everything is more
complicated. It was a simple example to illustrate the
problem, but in real application, the field is part of
primary key,
so update is not suitable. this example (by Ernikas) is not
quite
right, because sometimes it works fine, but it is possible
to write
insert, where function number always returns amiss result.

> It seems to be intermittent; i.e., when I dbinit a new
> 9.0.2.2542 database, it returns the wrong result the first
> time, but is OK the second time I run it.
>
> It seems to have something to do with NUMBER(*) in an
> expression.
>
> One workaround is to apply the NUMBER(*) in a subsequent
> UPDATE:
>
> begin
> declare @a integer;
> create table #temp(numeris integer);
> select 2 into @a;
> insert into #temp(numeris) select @a from sys.sysprocedure
> group by creator;
> update #temp set numeris = numeris + number(*);
> select * from #temp
> end;
>
> I'm guessing that in the real world, you might want an
> ORDER BY on the UPDATE... but maybe not.
>
> You could also apply the @a later:
>
> begin
> declare @a integer;
> create table #temp(numeris integer);
> select 2 into @a;
> insert into #temp(numeris) select number(*) from
> sys.sysprocedure group by creator;
> update #temp set numeris = numeris + @a;
> select * from #temp
> end;
>
> Breck
>


Breck Carter [TeamSybase] Posted on 2004-12-21 20:28:32.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: ASA 9.0.2 build 2542 (help, maybe it's a bug)
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <hk1hs09h7hbt8qbl1bc00aohm95h232ilo@4ax.com>
References: <lemds0l9jkp64kiqakaqpcftij071k73i7@4ax.com> <41c6eb54.32db.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
X-Original-Trace: 21 Dec 2004 12:28:27 -0800, bcarter.sentex.ca
Lines: 69
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 21 Dec 2004 12:28:29 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 21 Dec 2004 12:28:32 -0800
X-Trace: forums-1-dub 1103660912 10.22.108.75 (21 Dec 2004 12:28:32 -0800)
X-Original-Trace: 21 Dec 2004 12:28:32 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4004
Article PK: 7899

Well, if you show a more realistic example, perhaps another workaround
can be developed. One possibility is to insert the rows into a
temporary table, run update to fix the values, then copy them to the
real table. Temporary tables, especially NOT TRANSACTIONAL ones, are
rocket fast.

Or just use a temporary table to develop just the key values, add it
to the SELECT join when doing the INSERT.

Breck

On 20 Dec 2004 07:10:12 -0800, StupidBird wrote:

>Hi,
>
>Breck, thnx for suggestion, but everything is more
>complicated. It was a simple example to illustrate the
>problem, but in real application, the field is part of
>primary key,
>so update is not suitable. this example (by Ernikas) is not
>quite
>right, because sometimes it works fine, but it is possible
>to write
>insert, where function number always returns amiss result.
>
>> It seems to be intermittent; i.e., when I dbinit a new
>> 9.0.2.2542 database, it returns the wrong result the first
>> time, but is OK the second time I run it.
>>
>> It seems to have something to do with NUMBER(*) in an
>> expression.
>>
>> One workaround is to apply the NUMBER(*) in a subsequent
>> UPDATE:
>>
>> begin
>> declare @a integer;
>> create table #temp(numeris integer);
>> select 2 into @a;
>> insert into #temp(numeris) select @a from sys.sysprocedure
>> group by creator;
>> update #temp set numeris = numeris + number(*);
>> select * from #temp
>> end;
>>
>> I'm guessing that in the real world, you might want an
>> ORDER BY on the UPDATE... but maybe not.
>>
>> You could also apply the @a later:
>>
>> begin
>> declare @a integer;
>> create table #temp(numeris integer);
>> select 2 into @a;
>> insert into #temp(numeris) select number(*) from
>> sys.sysprocedure group by creator;
>> update #temp set numeris = numeris + @a;
>> select * from #temp
>> end;
>>
>> Breck
>>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com


Ernikas Posted on 2004-12-24 14:07:43.0Z
From: "Ernikas" <Ernikas@xxx.lt>
Newsgroups: ianywhere.public.general
References: <lemds0l9jkp64kiqakaqpcftij071k73i7@4ax.com> <41c6eb54.32db.1681692777@sybase.com> <hk1hs09h7hbt8qbl1bc00aohm95h232ilo@4ax.com>
Subject: Re: ASA 9.0.2 build 2542 (help, maybe it's a bug)
Lines: 79
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: lan-70-100.skynet.lt
X-Original-NNTP-Posting-Host: lan-70-100.skynet.lt
Message-ID: <41cc22af@forums-1-dub>
Date: 24 Dec 2004 06:07:43 -0800
X-Trace: forums-1-dub 1103897263 212.122.70.100 (24 Dec 2004 06:07:43 -0800)
X-Original-Trace: 24 Dec 2004 06:07:43 -0800, lan-70-100.skynet.lt
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4012
Article PK: 7903

We decided downgrade Sybase from 9.0.2 build 2542 to 9.0.1 build 1957.
9.0.1 don't have this errors :)

Ernikas

"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
message news:hk1hs09h7hbt8qbl1bc00aohm95h232ilo@4ax.com...
> Well, if you show a more realistic example, perhaps another workaround
> can be developed. One possibility is to insert the rows into a
> temporary table, run update to fix the values, then copy them to the
> real table. Temporary tables, especially NOT TRANSACTIONAL ones, are
> rocket fast.
>
> Or just use a temporary table to develop just the key values, add it
> to the SELECT join when doing the INSERT.
>
> Breck
>
> On 20 Dec 2004 07:10:12 -0800, StupidBird wrote:
>
> >Hi,
> >
> >Breck, thnx for suggestion, but everything is more
> >complicated. It was a simple example to illustrate the
> >problem, but in real application, the field is part of
> >primary key,
> >so update is not suitable. this example (by Ernikas) is not
> >quite
> >right, because sometimes it works fine, but it is possible
> >to write
> >insert, where function number always returns amiss result.
> >
> >> It seems to be intermittent; i.e., when I dbinit a new
> >> 9.0.2.2542 database, it returns the wrong result the first
> >> time, but is OK the second time I run it.
> >>
> >> It seems to have something to do with NUMBER(*) in an
> >> expression.
> >>
> >> One workaround is to apply the NUMBER(*) in a subsequent
> >> UPDATE:
> >>
> >> begin
> >> declare @a integer;
> >> create table #temp(numeris integer);
> >> select 2 into @a;
> >> insert into #temp(numeris) select @a from sys.sysprocedure
> >> group by creator;
> >> update #temp set numeris = numeris + number(*);
> >> select * from #temp
> >> end;
> >>
> >> I'm guessing that in the real world, you might want an
> >> ORDER BY on the UPDATE... but maybe not.
> >>
> >> You could also apply the @a later:
> >>
> >> begin
> >> declare @a integer;
> >> create table #temp(numeris integer);
> >> select 2 into @a;
> >> insert into #temp(numeris) select number(*) from
> >> sys.sysprocedure group by creator;
> >> update #temp set numeris = numeris + @a;
> >> select * from #temp
> >> end;
> >>
> >> Breck
> >>
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
> bcarter@risingroad.com
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com


Breck Carter [TeamSybase] Posted on 2004-12-24 16:13:30.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: ASA 9.0.2 build 2542 (help, maybe it's a bug)
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <uvfos0l7uplemvc71r1oi4l49prej518qr@4ax.com>
References: <lemds0l9jkp64kiqakaqpcftij071k73i7@4ax.com> <41c6eb54.32db.1681692777@sybase.com> <hk1hs09h7hbt8qbl1bc00aohm95h232ilo@4ax.com> <41cc22af@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
X-Original-Trace: 24 Dec 2004 08:13:25 -0800, bcarter.sentex.ca
Lines: 91
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 24 Dec 2004 08:13:28 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 24 Dec 2004 08:13:30 -0800
X-Trace: forums-1-dub 1103904810 10.22.108.75 (24 Dec 2004 08:13:30 -0800)
X-Original-Trace: 24 Dec 2004 08:13:30 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4014
Article PK: 7904

Stay tuned, however... there may be another 9.0.2.EBF soon :)

Breck

On 24 Dec 2004 06:07:43 -0800, "Ernikas" <Ernikas@xxx.lt> wrote:

>We decided downgrade Sybase from 9.0.2 build 2542 to 9.0.1 build 1957.
>9.0.1 don't have this errors :)
>
>Ernikas
>
>"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
>message news:hk1hs09h7hbt8qbl1bc00aohm95h232ilo@4ax.com...
>> Well, if you show a more realistic example, perhaps another workaround
>> can be developed. One possibility is to insert the rows into a
>> temporary table, run update to fix the values, then copy them to the
>> real table. Temporary tables, especially NOT TRANSACTIONAL ones, are
>> rocket fast.
>>
>> Or just use a temporary table to develop just the key values, add it
>> to the SELECT join when doing the INSERT.
>>
>> Breck
>>
>> On 20 Dec 2004 07:10:12 -0800, StupidBird wrote:
>>
>> >Hi,
>> >
>> >Breck, thnx for suggestion, but everything is more
>> >complicated. It was a simple example to illustrate the
>> >problem, but in real application, the field is part of
>> >primary key,
>> >so update is not suitable. this example (by Ernikas) is not
>> >quite
>> >right, because sometimes it works fine, but it is possible
>> >to write
>> >insert, where function number always returns amiss result.
>> >
>> >> It seems to be intermittent; i.e., when I dbinit a new
>> >> 9.0.2.2542 database, it returns the wrong result the first
>> >> time, but is OK the second time I run it.
>> >>
>> >> It seems to have something to do with NUMBER(*) in an
>> >> expression.
>> >>
>> >> One workaround is to apply the NUMBER(*) in a subsequent
>> >> UPDATE:
>> >>
>> >> begin
>> >> declare @a integer;
>> >> create table #temp(numeris integer);
>> >> select 2 into @a;
>> >> insert into #temp(numeris) select @a from sys.sysprocedure
>> >> group by creator;
>> >> update #temp set numeris = numeris + number(*);
>> >> select * from #temp
>> >> end;
>> >>
>> >> I'm guessing that in the real world, you might want an
>> >> ORDER BY on the UPDATE... but maybe not.
>> >>
>> >> You could also apply the @a later:
>> >>
>> >> begin
>> >> declare @a integer;
>> >> create table #temp(numeris integer);
>> >> select 2 into @a;
>> >> insert into #temp(numeris) select number(*) from
>> >> sys.sysprocedure group by creator;
>> >> update #temp set numeris = numeris + @a;
>> >> select * from #temp
>> >> end;
>> >>
>> >> Breck
>> >>
>>
>> --
>> SQL Anywhere Studio 9 Developer's Guide
>> Buy the book:
>http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
>> bcarter@risingroad.com
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> www.risingroad.com
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com