Subject | Re: RESTARTED [firebird-support] SELECT ... WHERE ... BETWEEN using TIMESTAMP felds |
---|---|
Author | masotti |
Post date | 2009-04-20T14:20:11Z |
Hi Fabio,
try refactoring query:
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.
try refactoring query:
> Select Art.DATA_ORA,Art.Codice,Art.Descrizione1,Lsv.Prezzo from Lsv,ARTSelect A.DATA_ORA, A.Codice, A.Descrizione1, L.Prezzo
> 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
>
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.