Come posso fare questo:Oracle: come filtrare per data e ora in una clausola where
select *
from tableName
where SESSION_START_DATE_TIME > To_Date ('12-Jan-2012 16:00', 'DD-MON-YYYY hh24:mi')
SESSION_START_DATE_TIME è nel formato '12/01/2012 13: 16: 32.000'
ho provato where To_Date (SESSION_START_DATE_TIME, 'DD-MON-YYYY hh24:mi') > To_Date ('12-Jan-2012 16:00', 'DD-MON-YYYY hh24:mi')
ma non importa quello che provo ottengo l'errore: SQL command not properly formed
Il campo "SESSION_START_DATE_TIME' a DATETIME o VARCHAR? – MatBailie
Ci sono parti dell'istruzione SQL che non ci stai mostrando? – wweicker
'DESC TABLENAME;'? La tua query funzionerà perfettamente se il campo di tipo 'TIMESTAMP' –