Re: using calculated column in where-clause

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: using calculated column in where-clause
Date: 2008-06-17 21:10:41
Message-ID: 20080617211041.GA11438@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Patrick Scharrenberg <pittipatti(at)web(dot)de> schrieb:
> Something like this
> select a, b , a*b as c from ta where c=2;
>
> But postgresql complains, that column "c" does not exist.
>
> Do I have to repeat the calculation (which might be even more complex

yes.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-06-17 21:15:13 Re: using calculated column in where-clause
Previous Message Patrick Scharrenberg 2008-06-17 20:46:08 using calculated column in where-clause