Re: where cannot use alias name of column?

From: Fernando Schapachnik <fschapachnik(at)vianetworks(dot)com(dot)ar>
To: Giorgio Volpe <giorgio(dot)volpe(at)gtngroup(dot)it>
Cc: Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: where cannot use alias name of column?
Date: 2001-09-13 12:09:28
Message-ID: 20010913090928.D92584@ns1.via-net-works.net.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

En un mensaje anterior, Giorgio Volpe escribió:
> May be it's my ignorance about sql ...
> but why cannot i use alias name of a column in a where clause?
>
>
> # select key as cc from mytable where cc > 0;
> ERROR: Attribute 'cc' not found

AFAIK you can't use alias in ther where part.

Good luck!

Fernando P. Schapachnik
Planificación de red y tecnología
VIA NET.WORKS ARGENTINA S.A.
fschapachnik(at)vianetworks(dot)com(dot)ar
Tel.: (54-11) 4323-3381

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-09-13 13:58:15 Re: where cannot use alias name of column?
Previous Message Thurstan R. McDougle 2001-09-13 12:03:54 Re: count of occurences PLUS optimisation