join hands,lets modernize...
Query: DECLARE @CSVValue NVARCHAR(50)='100,101,102' DECLARE @eachValue NUMERIC(9,0) while len(@CSVValue) ...