I'm trying to compare dates and it looks like I'm doing it like examples online, but I only see the rows of dates returned when I do >= for the comparison. When I just use = it doesn't return anything.
This is my query with >= for the date comparison:
select *
from valhist_tbl --dmh
where
CRTUPDDT >= to_date('28-10-21','DD-MM-YY')
and metricvalue <> 'Device Found'
order by CRTUPDDT asc
I see a lot of this sort of thing returned:
CRTUPDDT METRICVALUE
28-OCT-21 12.00.00.069000000 AM NOT FOUND
28-OCT-21 12.00.00.071000000 AM NOT FOUND
...
I want it to do this: CRTUPDDT = to_date('28-10-21','DD-MM-YY') but that doesn't return any rows.
I think the comparison as equals and not greater than has to do with the what is returned, but I'm not sure how to fix it. Also, I don't want to see duplicate lines returned, but there's so many that distinct makes it take forever.
This is a link I was looking at: date