Skip to content
Advertisement

How to get custom separators in SQL Server query

I have a table in SQL Server that looks like this

If this table was in Oracle and I wanted to get all the properties separated by different separators then I would write something like this

I would get output like this

Notice all the separators are different. How can I write a similar select statement for SQL Server?

Advertisement

Answer

You can use concat():

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement