Re: case with distinct
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merrill Oveson <merrill@actarg.com>
Cc: "pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>, kyle@actarg.com
Date: 2000-12-12T19:09:18Z
Lists: pgsql-bugs
Merrill Oveson <merrill@actarg.com> writes:
> This doesn't:
> select distinct
> orgid,
> case when status = 'y' then '1' else '0' end
> from vend
Try
select distinct
orgid,
case when status = 'y' then '1'::text else '0'::text end
from vend
7.1 is less picky about unknown-type constants...
regards, tom lane