syntax for access an alias in the where clause ?

From: Michael Agbaglo <byteshifter(at)shifted-bytes(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: syntax for access an alias in the where clause ?
Date: 2002-06-19 18:03:28
Message-ID: 3D10C770.7040100@shifted-bytes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Janning Vygen 2002-06-19 18:07:20 Re: Joining three data sources.
Previous Message Bruce Momjian 2002-06-19 16:43:04 Re: SQL performance issue with PostgreSQL compared to MySQL