I have a table, empno as a field with text datatype..
when i store the data it store like wise
Actually my customer has more than one site like 7005,7002 etc.,
so am storing the value 7005/101 where 7005 is site id and 101 is reference number
if it is for 7002, we are storing 7002/101 like wise
so now what am doing is
7005/101
7005/102
.......
......
7005/999
from the above am getting the the maximum one
i wrote the query like that
"select max(eno) from the table "
it gives 7005/999
after storing the next record ie) 7005/1000
am not able to get the maximum, that is 7007/1000 for this query "select max(eno) from the table "
it fetch onle 7005/999....
Please also check my post at sqlteam forum http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=112242
and http://forums.microsoft.com/MSDN/Sho...iteID=1&mode=1