Using like with date columns
Hello,
I have a column with data type DATE, when I do:
col_date = '07-MAR-2013'
Doesn't return any rows, which I can understand because of hours, minutes and seconds that are not shown, but when i do:
col_date like '07-MAR-2013'
It returns me rows that have 07-MAR-2013 on its value no matter what hours, minutes and seconds, like :
07-MAR-2013 01:57:13
07-MAR-2013 09:30:24
07-MAR-2013 16:10:33
07-MAR-2013 16:10:31
07-MAR-2013 16:22:46
07-MAR-2013 16:22:47
07-MAR-2013 16:39:33
07-MAR-2013 16:44:31
Does LIKE puts an implicit % at the beginning and end for the date values? Doesn't happen when I am working with varchar2.
Thanks,
Daniel
I have a column with data type DATE, when I do:
col_date = '07-MAR-2013'
Doesn't return any rows, which I can understand because of hours, minutes and seconds that are not shown, but when i do:
col_date like '07-MAR-2013'
It returns me rows that have 07-MAR-2013 on its value no matter what hours, minutes and seconds, like :
07-MAR-2013 01:57:13
07-MAR-2013 09:30:24
07-MAR-2013 16:10:33
07-MAR-2013 16:10:31
07-MAR-2013 16:22:46
07-MAR-2013 16:22:47
07-MAR-2013 16:39:33
07-MAR-2013 16:44:31
Does LIKE puts an implicit % at the beginning and end for the date values? Doesn't happen when I am working with varchar2.
Thanks,
Daniel
0