Re: ::text problem
От | Kumar |
---|---|
Тема | Re: ::text problem |
Дата | |
Msg-id | 00e301c3b3eb$5c26f7d0$7502a8c0@hdsc.com обсуждение исходный текст |
Ответ на | ::text problem ("Kumar" <sgnerd@yahoo.com.sg>) |
Список | pgsql-sql |
Thanks a lot. It worked. ----- Original Message ----- From: "Richard Huxton" <dev@archonet.com> To: "Kumar" <sgnerd@yahoo.com.sg>; "psql" <pgsql-sql@postgresql.org> Sent: Tuesday, November 25, 2003 9:44 PM Subject: Re: [SQL] ::text problem > On Tuesday 25 November 2003 12:37, Kumar wrote: > > > > SELECT > > CASE WHEN c1 IS NULL THEN 'Record_Not_Found'ELSE c1 END as > > approval_date FROM t1; > > ERROR: Bad timestamp external representation 'Record_Not_Found' > > > > > > SELECT > > CASE WHEN c1 IS NULL THEN 'Record_Not_Found'::text ELSE c1 END as > > approval_date FROM t1; > > ERROR: CASE types 'timestamp without time zone' and 'text' not matched > > Almost - you're on the right lines. Try: > SELECT > CASE > WHEN c1 IS NULL THEN 'Record_Not_Found'::text > ELSE c1::text > END as approval_date FROM t1; > > You need to make sure both options return type text. > > -- > Richard Huxton > Archonet Ltd
В списке pgsql-sql по дате отправления: