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 characters needed characters left characters exceeded

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

1 Answer

· Write an 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 characters needed characters left characters exceeded

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

Perfect Anthony, thanks for the help, enjoy your day!!
0 Likes 0 ·
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.