Re: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

RE: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
By the way, Bhavbhuti, CAST(COALESCE(tPB.dBillDt, '') AS TIMESTAMP) AS tDocDt will fail if tPB.dBillDt is null since '' cannot be converted to a timestamp (it is neither a timestamp nor null). Set

Re: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

RE: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
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

Re: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-13 Thread W O sistemas2000profesio...@gmail.com [firebird-support]
Svein, Bhavbhuti has a background as a Visual FoxPro developer and in that language exist empty dates. Probably is the reason why he had casted an empty string as a timestamp. The same thing had happened to me when I was learning SQL. Greetings. Walter. On Tue, May 13, 2014 at 4:02 AM,

Re: [firebird-support] COALESCE() + CAST() converts timestamp format

2014-05-12 Thread Thomas Beckmann thomas.beckm...@assfinet.de [firebird-support]
Hi Bhavbhuti, I do not know the exact solution, but I'd say: COALESCE(CAST(tPB.dBillDt AS TIMESTAMP), '') AS tDocDt converts timestamp inside servers environment to a string - the returning client receives a string and does not know about it's datatype - yet does not a apply specific