Re: [GENERAL] field alias in where condition

2005-06-03 Thread Tom Lane
=?ISO-8859-1?Q?Havasv=F6lgyi_Ott=F3?= <[EMAIL PROTECTED]> writes: > select substring(proname from 1 to 1) as nevresz, count(*) > from pg_proc > where nevresz = 'a' > order by nevresz > group by nevresz; > What is the problem? I cannot use column alias in where condition? Exactly. Per the SQL

Re: [GENERAL] field alias in where condition

2005-06-03 Thread Richard Huxton
Havasvölgyi Ottó wrote: Hi all, I issued the following queries: select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc where nevresz = 'a' order by nevresz group by nevresz; select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc order by nevresz group

[GENERAL] field alias in where condition

2005-06-03 Thread Havasvölgyi Ottó
Hi all, I issued the following queries: select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc where nevresz = 'a' order by nevresz group by nevresz; select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc order by nevresz group by nevresz; The first que