Subject | RE: [firebird-support] Datatypes are not comparable in expression CASE when using TIMESTAMPS |
---|---|
Author | Maya Opperman |
Post date | 2013-08-21T06:35:33Z |
>> Mark Rotteveel wrote:Aha, thanks, have fixed by casting the timestamp to a date:
>>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
when ((p.StartDate <= cast('Today' as date)) and (p.EndDate >= cast('Today' as date))) then
(cast('Today' as date) + 1)
else
(cast(p.enddate as date) + 1)
end
As you say, my other workaround probably shouldn't have worked either. Strange, but at least mystery is solved, thanks ;-)