I have a column in the following varchar format. I would like to extract the time based on a condition e.g. < 7:00.
x
Table1
Column: timer(varchar)
23:45
05:00
07:00
22:00
Expected output
test
05:00
07:30
I tried the following:
Select *
FROM Table1
where timer < 7:00
However, the result is not as expected.
Advertisement
Answer
Oracle does not have a time
date, so presumably the type is a string.
Use string comparisons:
where time < '07:00'
Note that the leading 0
is important!