question

sporter17 avatar image
sporter17 asked

string seperated by commas into same column

Struggling with this issue. I have a string seperated by commas, trying to seperate & add all into the same column with double quotes, please see below trying to convert 2964,7976,7978,7980,7990,7992,7994,7996,7998 to "2964","7976","7978","7980","7990","7992","7994","7996","7998" Any ideas? Thanks for the help and have a good day
string-splitting
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
anthony.green avatar image
anthony.green answered
SELECT '"'+REPLACE('2964,7976,7978,7980,7990,7992,7994,7996,7998',',','","')+'"' Should produce an output of what you want.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sporter17 avatar image sporter17 commented ·
Perfect Anthony, thanks for the help, enjoy your day!!
0 Likes 0 ·
anthony.green avatar image anthony.green commented ·
Cheers, glad I could help
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.