Subject Re: [firebird-support] Firebird 1.5 & DIALECT 3 and 'now' function
Author Helen Borrie
At 02:40 PM 14/02/2008, you wrote:
>Hi all,
>
>I try to convert my database from Dialect 1 to 3. Here is a simple
>table:
>
>CREATE TABLE USER_SESSION (
> ID INTEGER NOT NULL,
> LASTPAGETIME TIMESTAMP NOT NULL)
>
>In dialect 1, I can run follow query:
>
>select * from USER_SESSION
> WHERE (('now' - LastPageTime) > (1/60));
>
>But under Dialect 3, it always return follow error:
>
>"Expression evaluation not supported."
>
>How can I make my query working under Dialect 3?

select * from USER_SESSION
WHERE (cast ('now' as timestamp) - LastPageTime) > (1/60);

or

select * from USER_SESSION
WHERE (CURRENT_TIMESTAMP - LastPageTime) > (1/60);

./hb