how to replace multiple commas with single comma in sql || Sql interview question || Madhu

how to replace multiple commas with single comma in sql || Sql interview question || Madhu

SQL with Madhu

55 лет назад

205 Просмотров

How to replace multiple commas with a single comma


Query:
Declare @value varchar(200) ='abc,,,,,bcd,,,,,dca,,,acd,,,,,bda,,,,,,,cda,,,,,'
select replace(replace(replace(@value,',','.,'),',.',''),'.,',',')

Please do not forget to like, subscribe and share.

Тэги:

#information #news #multiple_comma #single_comma #sql #sql_server #ssis #ssms #msbi #comma_separated
Ссылки и html тэги не поддерживаются


Комментарии: