3
Shouts

SQL Concatenation - Get column values as comma seperated list using XML PATH() instead of UDF's using COALESCE

published 1080 days, 3 hours, 11 minutes ago posted by tsqltsql 1081 days, 2 hours, 19 minutes ago
Saturday, June 05, 2010 11:43:25 AM GMT Friday, June 04, 2010 12:35:53 PM GMT

SQL Concatenation - Get column values as comma seperated list using XML PATH() instead of UDF's using SQL COALESCE

In my projects I frequently need sql string concatenation to get a list of column values of a table which may be called as child just as a column of a parent record which can be simply solved as sql concatenation methods. In this case it is possible to solve this t-sql concatenate problem by creating a udf (Used Defined Function). We can select the parent rows, and as an additional column in the select we can call the udf function which gathers and concatenate string in sql the child values as comma or semicolon seperated scalar value.

category: Data | clicked: 1 | | source: www.kodyaz.com | show counter code
tags: sql tsql concatenate xml

No comments yet, be the first one to post comment.

To post your comment please login or signup