Subject Re: RESTARTED [firebird-support] SELECT ... WHERE ... BETWEEN using TIMESTAMP felds
Author masotti
Hi Fabio,

try refactoring query:

> Select Art.DATA_ORA,Art.Codice,Art.Descrizione1,Lsv.Prezzo from Lsv,ART
> where LSV.ART_CODICE=ART.CODICE
> AND LSV.DATA_ORA between CAST('03/20/2009 00:01:00' AS TIMESTAMP) and
> CAST('04/20/2009 23:59:00' AS TIMESTAMP)
> ORDER BY DATA_ORA
>

Select A.DATA_ORA, A.Codice, A.Descrizione1, L.Prezzo
from Lsv L JOIN ART A USING (CODICE)
WHERE L.DATA_ORA between CAST('03/20/2009 00:01:00' AS TIMESTAMP) and
CAST('04/20/2009 23:59:00' AS TIMESTAMP)
ORDER BY A.DATA_ORA -- or L.DATA_ORA? Isn't clear.

As you see two different ordering and Fb want you to be clearer.
Perhaps are you using different client and server version?

Ciao.
Mimmo.