RE: [firebird-support] Datatypes are not comparable in expression CASE when using TIMESTAMPS

2013-08-21 Thread Maya Opperman
Mark Rotteveel wrote: If both are DATE or both are TIMESTAMP everything is OK. When one is a DATE and the other is a TIMESTAMP it breaks down Aha, thanks, have fixed by casting the timestamp to a date: when ((p.StartDate = cast('Today' as date)) and (p.EndDate = cast('Today' as date))) then

[firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread majstor
Hello, I have an sql statement which is don't work: SELECT CAST(CURRENT_TIME AS VARCHAR(10)) FROM RDB$DATABASE maybe I'm craisy, but what is wrong???

Re: [firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread Lester Caine
majstor wrote: Hello, I have an sql statement which is don't work: SELECT CAST(CURRENT_TIME AS VARCHAR(10)) FROM RDB$DATABASE maybe I'm craisy, but what is wrong??? SELECT SUBSTRING ( CURRENT_TIME from 1 for 10 ) FROM RDB$DATABASE CURRENT_TIME is 13 characters long and CAST does not know

Re: [firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread Wewe
SELECT substring(CAST(CURRENT_TIME AS VARCHAR(13)) from 1 for 8) FROM RDB$DATABASE From: majstor majst...@yahoo.com To: firebird-support@yahoogroups.com Sent: Wednesday, August 21, 2013 4:32 PM Subject: [firebird-support] Converting CURRENT_TIME to VARCHAR

Re: [firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread W O
As others had said, the context variable CURRENT_TIME returns 13 characters. It works fine: SELECT CAST(CURRENT_TIME AS VARCHAR(13)) FROM RDB$DATABASE Greetings. Walter. On Wed, Aug 21, 2013 at 5:54 AM, Wewe sullen...@yahoo.com wrote: ** SELECT substring(CAST(CURRENT_TIME AS

Re: [firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread Mark Rotteveel
On Wed, 21 Aug 2013 12:13:14 -0400, W O sistemas2000profesio...@gmail.com wrote: As others had said, the context variable CURRENT_TIME returns 13 characters. It works fine: SELECT CAST(CURRENT_TIME AS VARCHAR(13)) FROM RDB$DATABASE CURRENT_TIME doesn't return 13 characters, but a TIME

Re: [firebird-support] Converting CURRENT_TIME to VARCHAR

2013-08-21 Thread W O
Ok, right, bad words. Greetings. Walter. On Wed, Aug 21, 2013 at 12:20 PM, Mark Rotteveel m...@lawinegevaar.nlwrote: ** On Wed, 21 Aug 2013 12:13:14 -0400, W O sistemas2000profesio...@gmail.com wrote: As others had said, the context variable CURRENT_TIME returns 13 characters.