I have a field that I would like to get the max value of but it is a varchar2(6) field, all numerals. I am unable to change the type of field
The field is a date listed like this 201307 for July 2013. Just using MAX does not work.
Using oracle.
I have a field that I would like to get the max value of but it is a varchar2(6) field, all numerals. I am unable to change the type of field
The field is a date listed like this 201307 for July 2013. Just using MAX does not work.
Using oracle.
SELECT MAX(date) "MostRecent" FROM tablename;
Should work. YYYYMM is going to sort as newest first in a MAX aggregate or analytic function in Oracle.