Subject Re: [IBO] Date arithmetics
Author Svein Erling Tysvaer
At 20:34 02.04.2003 +1000, you wrote:
>At 12:40 PM 2/04/2003 +0200, you wrote:
> >I worked around this using a stored procedure. Still, I do wonder why
> >
> >SELECT AColumn
> >FROM ATable
> >WHERE Date1 BETWEEN Date2 - :OneInteger AND Date2 - :AnotherInteger
> >
> >insists on OneInteger being a TimeStamp when used in a normal TIB_Cursor or
> >IB_SQL?
>
>Bracketing?
>What does this do ---
>
>SELECT AColumn
>FROM ATable
>WHERE
>(Date1 BETWEEN (Date2 - :OneInteger) AND (Date2 - :AnotherInteger))

IB_SQL still reports that OneInteger is supposed to be a TimeStamp, whereas
AnotherInteger is a Numeric(18,9).

Since it worked using a SP, it is no big deal, but it still puzzles me.

I also tried changing to adding a number of days rather than subtracting,
and then I got a dynamic SQL error 335544569: 'expression evaluation not
supported' (which is quite reasonable if believing OneInteger to be a
TimeStamp).

Set