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.

limitations on select alias names?

2 posts in Windows NT Last posting was on 2000-03-21 11:58:51.0Z
Daniel Rabe Posted on 2000-03-14 23:24:59.0Z
From: "Daniel Rabe" <danielrabe@earthlink.net>
Subject: limitations on select alias names?
Date: Tue, 14 Mar 2000 16:24:59 -0700
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <782Yyxgj$GA.151@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 86.denver-01-02rs.co.dial-access.att.net 12.74.72.86
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2414
Article PK: 1089867

select max(MyCol) as MyCol from MyTable group by MyCol

does not work in ASA 6.0 (Windows NT). It gives "invalid expression near
'MyCol'". If I change the alias to anything other than the actual column
name, it works. Is this the SQL standard, or is this a Sybase bug? (Both
Oracle 8 and SQL Server 7 permit this construct).


Ahmad AbdelHady Posted on 2000-03-21 11:58:51.0Z
Reply-To: "Ahmad AbdelHady" <ahady@generation.ca>
From: "Ahmad AbdelHady" <ahady@generation.ca>
References: <782Yyxgj$GA.151@forums.sybase.com>
Subject: Re: limitations on select alias names?
Date: Tue, 21 Mar 2000 13:58:51 +0200
Lines: 17
Organization: Generation Systems Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <y#cvP1yk$GA.285@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 60-15.idsc.gov.eg 163.121.15.60
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2392
Article PK: 1089846

try
select "MyCol"=max(MyCol) from MyTable group by MyCol

Daniel Rabe <danielrabe@earthlink.net> wrote in message
news:782Yyxgj$GA.151@forums.sybase.com...
> select max(MyCol) as MyCol from MyTable group by MyCol
>
> does not work in ASA 6.0 (Windows NT). It gives "invalid expression near
> 'MyCol'". If I change the alias to anything other than the actual column
> name, it works. Is this the SQL standard, or is this a Sybase bug? (Both
> Oracle 8 and SQL Server 7 permit this construct).
>
>
>
>