I am using this query:
SELECT ts as "TimeStamp",
stat as "Status"
FROM myTable
WHERE stat = 'O'
AND source = 'Source1'
AND ts BETWEEN TO_TIMESTAMP('2013-10-05','yyyy-mm-dd') AND
TO_TIMESTAMP('2013-10-06','yyyy-mm-dd')
And also tried:
SELECT ts as "TimeStamp",
stat as "Status"
FROM myTable
WHERE stat = 'O'
AND source = 'Source1'
AND ts >= TO_TIMESTAMP('2013-10-05','yyyy-mm-dd') AND ts <
TO_TIMESTAMP('2013-10-06','yyyy-mm-dd')
It returns 0 records, but if I do
SELECT ts as "TimeStamp",
stat as "Status"
FROM myTable
WHERE stat = 'O'
I can clearly identify 5 records. Apparently the TO_TIMESTAMP is not working properly I am hoping someone might be able to help identify the proper fix
Edit: To clarify, I only want the timeframe for 10/5 not including 10/6 Sorry pasted wrong results Also the field is of type TIMESTAMP(6)