I need to write a sql to fetch the data which has been created between yesterday 5pm and today 11 am .I am using the following criteria to achieve that and i am getting an error message saying not a valid month.
We are on oracle database.
AND A.DTTM_STAMP_SEC >= TO_DATE(SYSDATE -1|| '17','MM/DD/YYYY HH24')
AND A.DTTM_STAMP_SEC < TO_DATE(SYSDATE || '16','MM/DD/YYYY HH24')
Any help on this is appreciated.