Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [DB Access] Problema con query compresa fra 2 date

    Salve io provo ad eseguire questa query in un db Access

    select * from ALARM_LOG where timestamp>=#2006-01-01# and timestamp<=#2006-01-31# order by timestamp desc

    oppure questa

    select * from ALARM_LOG where timestamp beetween #2006-01-01# and #2006-01-31# order by timestamp desc

    Mi vengono restituiti i dati fino al 30 gennaio al posto che fino al 31.

    Come è possibile visualizzare i dati fino al 31 senza mettere nella seconda data 2006-02-01???

  2. #2
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427
    1] 2006-01-01 ma access gestisce le date con questo formato e non con formato 2006/01/01 ??

    2] tecnicamente la query sembra corretta
    forse proverei a gestirle come testo

    select * from ALARM_LOG where timestamp>='2006-01-01' and timestamp<='2006-01-31' order by timestamp desc
    ma è solo un ipotesi
    2000 post e sono più vecchio di 4 anni...
    grazie a tutti....

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.