Grails/Hibernate max for string type
Posted
by bsreekanth
on Stack Overflow
See other posts from Stack Overflow
or by bsreekanth
Published on 2010-05-13T02:50:09Z
Indexed on
2010/05/13
2:54 UTC
Read the original article
Hit count: 274
Hello,
In my table I have a serial number field, which is represneted by string.. It has a prefix and some numbers follow. Eg: ABC1234, ABC2345 etc. How to retrieve the largest value (max equivalent of int type) from this column. In my case it would be ABC2345. I probably could retrieve all the data,, sort it and get the same, but that would be slow.
thanks in advance..
© Stack Overflow or respective owner