How change col name during query to use it in where clause - Mailing list pgsql-sql

From Marcel Ruff
Subject How change col name during query to use it in where clause
Date
Msg-id 4FA3AEA9.6010401@marcelruff.info
Whole thread Raw
Responses Re: How change col name during query to use it in where clause  (Andreas Kretschmer <andreas@a-kretschmer.de>)
Re: How change col name during query to use it in where clause  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-sql
Hi,

is an alias name not usable in the where clause?

select EXTRACT(day from enddate::TIMESTAMP - old_enddate::TIMESTAMP) AS TAGE  from account_h  where 
TAGE>5;
ERROR:  column "tage" does not exist
LINE 1: ... TAGE>5 ...

Thank you
Marcel


pgsql-sql by date:

Previous
From: Robert Bernier
Date:
Subject: Re: [seapug] Re: [BUGS] pg_dump: aborting because of server version mismatchT
Next
From: "Oliveiros d'Azevedo Cristina"
Date:
Subject: Re: How change col name during query to use it in where clause