Max function on varchar value
-
in my table i am entering values like A/101/2010,A/102/2010.......A/1000/2010 after this value when i use MAx() function which return me A/999/2010 now i need the query which should return this value 'A/1000/2010' and on words plz help me out.....
-
in my table i am entering values like A/101/2010,A/102/2010.......A/1000/2010 after this value when i use MAx() function which return me A/999/2010 now i need the query which should return this value 'A/1000/2010' and on words plz help me out.....
You should write an user defined function for your issue because the values which you are storing are not number data type. Also you need to sort the records based on year which is last 4 chars in your sample value. So write an UDF.
thatraja
-
in my table i am entering values like A/101/2010,A/102/2010.......A/1000/2010 after this value when i use MAx() function which return me A/999/2010 now i need the query which should return this value 'A/1000/2010' and on words plz help me out.....