I have a variable which contains the following string: AL,CA,TN,VA,NY
I have no control over what I get in that variable (comes from reporting services)
I
declare @x varchar(50) = 'AL,CA,TN,VA,NY' select '''' + REPLACE(@x, ',', ''',''') + ''''