For example you have a select that returns this result:
A
|
B
|
C
|
D
|
but you need:
A, B, C, D
|
the seguente script makes this: a Row Value Concatenation.
SELECT
STUFF((
SELECT
', '
+ ltrim(rtrim(Your_Field))
FROM
Your_Table
FOR XML PATH('')
),1,2,'')
My Two Cents ...
Nessun commento:
Posta un commento