Re: How to pickup null values in SQL Language?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: How to pickup null values in SQL Language?
Дата
Msg-id 20020530232625.B51562-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: How to pickup null values in SQL Language?  (Tahira Aslam <tahira_aslam@yahoo.com>)
Ответы Re: How to pickup null values in SQL Language?  (Tahira Aslam <tahira_aslam@yahoo.com>)
Список pgsql-general
On Thu, 30 May 2002, Tahira Aslam wrote:

>
>  thanks Mr.Stephen your solution solved my problem. But now I want to
> use COALASCE function in a function which uses 'plpgsql'
> language.(function needs to perform same functionality as it was in
> SQL language)

> 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).

Hmm, on current sources similar structures with coalesce seem to work as
long as the cast is done.

Can you give enough of the schema to recreate the specifics of your
situation (table structure, view structure and the function).


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

Предыдущее
От: Tahira Aslam
Дата:
Сообщение: Re: How to pickup null values in SQL Language?
Следующее
От: Tahira Aslam
Дата:
Сообщение: Re: How to pickup null values in SQL Language?