Reputation: 17893
I am trying to get all rowsprior to current time and date including today's transactions.
select * from mytable
where joindate <= trunc(sysdate)
I did not get rows that belong to today.
AM I doing any thing wrong.
Upvotes: 0
Views: 66
Reputation: 6089
Try to run
select trunc(sysdate) from dual;
and you will see an output like 2014-05-24 00:00:00
. trunc
sets the time to midnight.
You can try
where joindate < trunc(sysdate)+1
to look for all joindate
s before 2014-05-25 00:00:00
which should meet your requirements.
Upvotes: 2