declare @ds varchar(25) set @ds = CONVERT(CHAR(10), GETDATE(),126) set @ds = LEFT(@ds, LEN(@ds) - 6) set @ds = RIGHT(RTRIM(@ds), 2) select @ds+ '/' + RIGHT('0000' + <big>CONVERT(VARCHAR(5),MAX(CAST(RIGHT(COLUMN_NAME,5)AS INT))+ 1),5) DC_No from Table_Name
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)