Re: [SQL] ::text problem

2003-11-26 Thread Kumar
Thanks a lot. It worked. - Original Message - From: "Richard Huxton" <[EMAIL PROTECTED]> To: "Kumar" <[EMAIL PROTECTED]>; "psql" <[EMAIL PROTECTED]> Sent: Tuesday, November 25, 2003 9:44 PM Subject: Re: [SQL] ::text problem

Re: [SQL] ::text problem

2003-11-25 Thread Richard Huxton
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

[SQL] ::text problem

2003-11-25 Thread Kumar
Hi ,   I am running postgres 7.3.4 on Linux 7.2. I wanna print 'Not Supplied' if 'c1' column of datatype - 'timestamp' is null. For that I am using case statement   SELECT     CASE WHEN c1 IS NULL THEN 'Record_Not_Found'ELSE c1 END as approval_date FROM  t1; ERROR:  Bad timestamp external re