From: | Tahira Aslam <tahira_aslam(at)yahoo(dot)com> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to pickup null values in SQL Language? |
Date: | 2002-05-31 06:47:50 |
Message-ID: | 20020531064750.27917.qmail@web11003.mail.yahoo.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Curt Sampson | 2002-05-31 06:56:57 | Re: Scaling with memory & disk planning (was Re: Non-linear |
Previous Message | Stephan Szabo | 2002-05-31 06:30:06 | Re: How to pickup null values in SQL Language? |