select max(LACode) as M from dbo.tblLeaveApproval where len(LACode)=8
LAC-8038
select max(LACode) as M from dbo.tblLeaveApproval
LAC-999
LACode
select MAX(CAST(SUBSTR(LACode,5) as integer)) from dbo.tblLeaveApproval;
'LAC-'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)