syntax for access an alias in the where clause ?

Поиск
Список
Период
Сортировка
От Michael Agbaglo
Тема syntax for access an alias in the where clause ?
Дата
Msg-id 3D10C770.7040100@shifted-bytes.de
обсуждение исходный текст
Ответы Re: syntax for access an alias in the where clause ?  (Wei Weng <wweng@kencast.com>)
Re: syntax for access an alias in the where clause ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: syntax for access an alias in the where clause ?  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Re: syntax for access an alias in the where clause ?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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.





В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: SQL performance issue with PostgreSQL compared to MySQL
Следующее
От: Wei Weng
Дата:
Сообщение: Which one is faster?