I have a varchar string in SQL Server:
DECLARE @vStr VARCHAR(MAX) = ';ABC,DEF,+123456789,+987654321,0,0,0,0,0,+987654321,1110:'
For this string I want result like:
'+123456789,+987654321,0,0,0,0,0,+987654321'
DECLARE @vStr VARCHAR(MAX) = ';PQR,XYZ,+987654321,+987654321,0,0,0,0,0,+9876123456,5555:'
should generate result like:+987654321,+987654321,0,0,0,0,0,+9876123456
I am trying substring with left and len but it is not working.
UPDATE:
In general I do not want first two part of this comma separated string and also I do not want last part of the comma separated string.
+up to the last string with+?