Re: How to pickup null values in SQL Language?

Поиск
Список
Период
Сортировка
От Tahira Aslam
Тема Re: How to pickup null values in SQL Language?
Дата
Msg-id 20020531064750.27917.qmail@web11003.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: How to pickup null values in SQL Language?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general

 
> Select cast(MyView."Document_ID" as
> Text)||','||cast(MyView."First_Name" as
> Text)||','||cast(MyView."Last_Name" as
> Text)||','||Coalesce(cast(MyView."Sent_Date" as Text),'NONE') From "MyView"
> Where "Document_ID"=$1;
> Language 'plpgsql';
>
> But it gives error "Bad date external representation 'NONE' "....

Well, the above isn't legal plpgsql really (you'd need to be using
two quotes around NONE and there's a missing begin/end, I assume
you're just not showing those).


:)  Actually i didn't feel the need to write whole function. This function worked fine until there came a record with one empty field, and it returned me nothing.I feel the need to replace the Null fields with 'NONE' value...so that concatenated string should return me record. (It returns nothing if there is a field with no value inside it ..I mean empty field.)

 



Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: How to pickup null values in SQL Language?
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: Scaling with memory & disk planning (was Re: Non-linear