🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.sqlinfo
Article #255

SQL Syntax Question

#255
From: Greg Doherty
Date: Fri, 23 Aug 2002 18:20
14 lines
1296 bytes
Below is the same query written in 2 different ways.  Since I'm specifying
an alias "aaa_no" for the column "Part.lPartNo", I would assume that I
should be able to use that alias in the where clause.  Is my assumption
correct?  Is this valid SQL syntax (SQL - 92)?  If so, I will report it to
my vendor as a bug (Pervasive.SQL 2000i).

WORKS:
SELECT Part.lPartNo AS "aaa_no" FROM Part WHERE Part.lPartNo = 1

DOESN'T WORK:
SELECT Part.lPartNo AS "aaa_no" FROM Part WHERE "aaa_no" = 1

Thanks,
- Greg
Technical Details
Message-ID: <umcv5795a4bjac@corp.supernews.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-05!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11355a,255f2bc1ac9d01ea,start
X-Google-Attributes: gid11355a,public
X-Google-ArrivalTime: 2002-08-23 11:20:47 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-05!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: "Greg Doherty" <no spam please>
Newsgroups: bit.listserv.sqlinfo
Subject: SQL Syntax Question
Date: Fri, 23 Aug 2002 11:20:17 -0700
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <umcv5795a4bjac@corp.supernews.com>
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
X-Complaints-To: newsabuse@supernews.com
Lines: 17