Oracle date coding returning min date value -
i have table returning 2 rows same data on including start date same both rows in question, there update date column different per row. how find 1 closest start date. e.g.
date 1 27/01/2014 date 2 27/01/2015 07:39:30 date 2 row 2 27/01/2015 11:30:51
there plenty of other columns involved these relevant ones, how return row earliest date? row containing 07:39:30 have tried using min function returning both rows.
how return row earliest date? row containing 07:39:30 have tried using min function returning both rows.
in oracle, date data type has both date , time portions. date function applied on date column give perfect result, unless have design issue. frequent design problems related storing date values string.
for example,
among below mentioned date values,
27/01/2015 07:39:30
27/01/2015 11:30:51
the min
function on above mentioned date values return 27/01/2015 07:39:30
.
Comments
Post a Comment