I am trying to attach specific hours of the day to my WHERE clause which checks a date and time stamp of of datetime field and also uses sysdate to get the correct date. I cannot seem to get the syntax right as I am not a truw sql programmer. Can someone show me how I could code this statement up so that it would do the compare? Thanks so much.
Code:
WHERE (tdl.poll_time BETWEEN trunc(sysdate-7,'DD') 08:00 AND trunc(sysdate-6,'DD') 11:00)