::text problem

Поиск
Список
Период
Сортировка
От Kumar
Тема ::text problem
Дата
Msg-id 037f01c3b350$fa38ae00$7502a8c0@hdsc.com
обсуждение исходный текст
Ответы Re: ::text problem
Список pgsql-sql
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 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
 
 
Where I am doing wrong? Please shed some light.
 
Regards
Senthil Kumar S
DBA

В списке pgsql-sql по дате отправления:

Предыдущее
От: "vijaykumar M"
Дата:
Сообщение: Re: how to read bytea contents by using pgsql scripts
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: ::text problem