select top 1 CONVERT(int, ISNULL( REPLACE( ClientCode , '{0}' ,''),0) ) +1 as MaxValue from CRM_Client where ClientCode like '{0}%' " + "order by CONVERT(int, REPLACE( ClientCode , '{0}' ,'')) desc
此随笔或为自己所写、或为转载于网络。仅用于个人收集及备忘。