Re: syntax for access an alias in the where clause ? - Mailing list pgsql-sql

From Wei Weng
Subject Re: syntax for access an alias in the where clause ?
Date
Msg-id 1024516580.20296.8.camel@Monet
Whole thread Raw
In response to syntax for access an alias in the where clause ?  (Michael Agbaglo <byteshifter@shifted-bytes.de>)
List pgsql-sql
Is it allowed to use spaces in postgresql alias? 

Why dont you try to use alias1 instead of "alias 1"?


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
> 
-- 
Wei Weng
Network Software Engineer
KenCast Inc.




pgsql-sql by date:

Previous
From: Wei Weng
Date:
Subject: Which one is faster?
Next
From: Bruce Momjian
Date:
Subject: Re: Which one is faster?