Reputation: 13
i have table (sample below),
ARTICLE DATE
104425 05.09.2014
105996 24.07.2014
105999 13.07.2014 3:00:00
106005 14.08.2014
106008 05.07.2014
how can i select rows with time in it?
UPD: Colomn DATE have (DD.MM.YYYY) and (DD.MM.YYYY H24:MI:SS) simultaneously
Upvotes: 0
Views: 95
Reputation: 17429
The Oracle date
datatype always has a time component. The way the date is being displayed on your system causes the time to be omitted if it's midnight. In order to get this to do what you want, you need to exclude those times that are at midnight. trunc
can be used to set a date
to midnight, which is why select * from your_table where trunc(date) <> date
works. However, you should be aware that this could cause unexpected side effects if you ever intentionally set the time to midnight.
Upvotes: 0
Reputation: 2136
Not sure I understand clearly what you want. Does your table have a Time column ? In that case you should do something like :
SELECT * FROM your_table WHERE Time IS NOT NULL;
Upvotes: 0