[Solved] HOW TO SUBSTRING in SQL QUERY
Just check this sample , you have to use charindex(to find the index of comma) and substring function to get substring value Declare @var varchar(50) = ‘21699,21712’ select charindex( ‘,’, @var), substring ( @var, charindex(‘,’, @var)+1, len(@var)) you can also use this too: declare @var varchar(50) = ‘21699,21712’ select charindex( ‘,’, @var), substring ( @var, … Read more