Subject Re: [firebird-support] COALESCE() + CAST() converts timestamp format
Author Venus Software Operations
I think I had issues creating the front end cursor (post processing of data from FireBird in Visual FoxPro) for reporting purposes (using Report Manager, see SourceForge) then the date/time as returnd by FireBird was NULL.  I think I will remove the COALESCE and see where the thing falls apart when encountered a NULL from FireBird and revisit the whole thing again.

Kind regards
Bhavbhuti


On 13-05-2014 01:32 pm, Svein Erling Tysvær svein.erling.tysvaer@... [firebird-support] wrote:
 

>Thanks Svein.  Would you suggest I double COALESCE it?  I think it will be an overkill and I might end up with an ANSI datetime again. 
>Or should I not COALESCE it at all?  I wanted a blank date time in case of a NULL for tBillDt and if there is a date in tBillDt I need
>it for date calculation later on as post processing from the front ends.

What is a blank date, Bhavbhuti? Either it is NULL (unknown) or an actual date. Blank as in '' is a (var)char concept, it doesn't exist for dates or timestamps and give an error. So you basically have to choose between having a date for calculation or a string for display.

If you're thinking in terms of WHERE clauses, you may sometimes use IS [NOT] DISTINCT FROM as an alternative to = or <>.

HTH,
Set


-- 


Thanking you.

Yours Faithfully,
For Venus Software Operations
----
Mr. Bhavbhuti Nathwani
___________________________________________
Softwares for Indian Businesses at: http://www.venussoftop.com

venussoftop@...
venussoftop@...
___________________________________________

Please note: We reserve complete rights for policy changes in the future and the same will be applicable immediately as and when made.  Attachments may get corrupted before reaching you, in such a situation please let us know and we will resend you the same at the earliest.  We do not take any responsibility for data loss of any type and kind.  Data safety remains the sole the responsibility of the users of our softwares.
___________________________________________

Internet email confidentiality:

This message may contain information that may be privileged or confidential.  If you are not the addressee nor are you responsible for the delivery of the message to the addressee indicated in this email, then you may not copy or deliver this email to anyone and you should notify the sender by reply email and then destroy this message.

Please reply email immediately to this message with REMOVE in the subject, if you or your employer do not consent to email of this kind.

Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by my company.