Hello All,
I am wondering, why I can not add the following ' A 10' in the where
clause i.e. 'where nspname !~* 'pg_' and A 10'
Select nspname, (SELECT count(*) as count FROM pg_tables where schemaname =
nspname) as A
FROM pg_namespace
where nspname !~* 'pg_'
Thanks in advance
I am wondering, why I can not add the following ' A 10' in the where
clause i.e. 'where nspname !~* 'pg_' and A 10'
Select nspname, (SELECT count(*) as count FROM pg_tables where schemaname =
nspname) as A
FROM pg_namespace
where nspname !~* 'pg_'
what you are looking for is
On Fri, Apr 15, 2011 at 11:22 AM, salah jubeh s_ju...@yahoo.com wrote:
Hello All,
I am wondering, why I can not add the following ' A 10' in the where
clause i.e. 'where nspname !~* 'pg_' and A 10'
Select nspname, (SELECT count(*) as count FROM pg_tables where schemaname =
statement ( as in the original
post) in the where clause.
Regards
From: Chris Curvey ch...@chriscurvey.com
To: salah jubeh s_ju...@yahoo.com
Cc: pgsql pgsql-general@postgresql.org
Sent: Fri, April 15, 2011 5:28:39 PM
Subject: Re: [GENERAL] correlated query
: Fri, April 15, 2011 5:26:45 PM
Subject: Re: [GENERAL] correlated query as a column and where clause
I am wondering, why I can not add the following ' A 10' in the where
clause i.e. 'where nspname !~* 'pg_' and A 10'
Select nspname, (SELECT count(*) as count FROM pg_tables where
salah jubeh s_ju...@yahoo.com writes:
But, why I can not use the alias of the select statement ( as in the
original
post) in the where clause.
The select list can only be computed after the where clause has filtered
the rows, so such a thing would be circular.
From: Tom Lane t...@sss.pgh.pa.us
To: salah jubeh s_ju...@yahoo.com
Cc: ch...@chriscurvey.com; pgsql pgsql-general@postgresql.org
Sent: Fri, April 15, 2011 5:49:35 PM
Subject: Re: [GENERAL] correlated query as a column and where clause
salah jubeh s_ju...@yahoo.com writes