I have db table which have column name STATUSDATE
. Type of this column is varchar2 and that column already have data in dd/mm/yyyy format. And i want get the recent date(max date). I used max() method for this but it not give the correct result,
as example consider following dates
31/08/2014
01/09/2016
after using max(STATUSDATE) the result is 31/08/2014. I'm using oracle db.
I'm try to use following quarry but since above problem its give incorrect results
SELECT * FROM MY_DB.MY_TABLE t
inner join (
select CLIENTNAME, max(STATUSDATE) as MaxDate
from FROM MY_DB.MY_TABLE
group by CLIENTNAME
) tm on t.CLIENTNAME = tm.CLIENTNAME and t.STATUSDATE = tm.MaxDate
please can anyone suggest proper way to do this Thank You