T-SQL: Opposite to string concatenation – how to split string into multiple records [duplicate]

You can also achieve this effect using XML, as seen here, which removes the limitation of the answers provided which all seem to include recursion in some fashion. The particular use I’ve made here allows for up to a 32-character delimiter, but that could be increased however large it needs to be. create FUNCTION [dbo].[Split] … Read more

Simulating group_concat MySQL function in Microsoft SQL Server 2005?

SQL Server 2017 does introduce a new aggregate function STRING_AGG ( expression, separator). Concatenates the values of string expressions and places separator values between them. The separator is not added at the end of string. The concatenated elements can be ordered by appending WITHIN GROUP (ORDER BY some_expression) For versions 2005-2016 I typically use the … Read more

techhipbettruvabetnorabahisbahis forumu