From: Michael Agbaglo <byteshifter@shifted-bytes.de>
To: Wei Weng <wweng@kencast.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: syntax for access an alias in the where clause ?
Date: Wed, 19 Jun 2002 23:13:31 +0200
Message-ID: <3D10F3FB.6090706@shifted-bytes.de> (raw)
References: <3D10C770.7040100@shifted-bytes.de>
<1024516580.20296.8.camel@Monet>
Wei Weng wrote:
> Is it allowed to use spaces in postgresql alias?
>
> Why dont you try to use alias1 instead of "alias 1"?
really amusing... muhahaha...
I don't use the brackets either... I didn't assume that you might be
interested in how the expression looks like or what aliases I'm using...
>
>
> On Wed, 2002-06-19 at 14:03, Michael Agbaglo wrote:
>
>>Hi !
>>
>>It's long ago since I used SQL :-)
>>
>>select [expression 1] as [alias 1], [expression 2] as [alias 2]
>>where [alias 1] < [alias 2]
>>order by [alias 2] - [alias 1]
>>
>>---> ERROR: Attribute '[alias 1]' not found
>>
>>I found a lot of 'select [expression] as' but I've never seen somebody
>>accessing the alias ... Can't this be done ?
>>
>>M.
>>
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>
>>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: byteshifter@shifted-bytes.de, wweng@kencast.com
Subject: Re: syntax for access an alias in the where clause ?
In-Reply-To: <3D10F3FB.6090706@shifted-bytes.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox