question

shankie avatar image
shankie asked

concat value of single cell

eg column1 1) one , two three i want fetch like "onetwothree"
concatenation
3 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.

can you reformat the text? I cannot tell which columns contain which data, and how many rows there are? Better still, provide the DDL and DML statements to mock this table up.
1 Like 1 ·
Are you saying one, two, three are values within the column1 and you want to pivot them around and concatenate them?
0 Likes 0 ·
Or possibly that "one , two three" is the value in the table and you want to display it without the special characters/spaces? e.g. "onetwothree"
0 Likes 0 ·

1 Answer

·
Sule avatar image
Sule answered
SELECT REPLACE(REPLACE(REPLACE(column1,' ',''),',',''),'.','') FROM Table or create function, something like this: http://stackoverflow.com/questions/1007697/how-to-strip-all-non-alphabetic-characters-from-string-in-sql-server
10 |1200

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

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.