Subject | Re: [firebird-support] Why a certain expression in 'where' throws an error? |
---|---|
Author | Ann W. Harrison |
Post date | 2010-12-22T16:35:13Z |
On 12/22/2010 11:20 AM, kokok_kokok wrote:
environment, but always, Always, ALWAYS include the error message!
Cheers,
Ann
> I have simple query:Often it helps to indicate the version of Firebid, sometimes the
>
>
> SELECT * FROM Orders
> WHERE
> CAST(OrderDate + CAST((LfAvgDays+0.5) AS INTEGER) AS DATE) BETWEEN '2009/1/1' AND '2010/1/1'
>
>
> OrderDate is date type. LfAvgDays is float type. Why do I get error when I execute it?
>
> I have tried also:
>
> SELECT * FROM Orders
> WHERE
> CAST(OrderDate + CAST((LfAvgDays+0.5) AS INTEGER) AS DATE) BETWEEN
> CAST('2009/1/1' AS DATE) AND CAST('2010/1/1' AS DATE)
>
environment, but always, Always, ALWAYS include the error message!
Cheers,
Ann