Skip to content

Instantly share code, notes, and snippets.

@jgdoncel
Created December 17, 2013 08:24
Show Gist options
  • Save jgdoncel/5592b843af6be8eff410 to your computer and use it in GitHub Desktop.
Save jgdoncel/5592b843af6be8eff410 to your computer and use it in GitHub Desktop.
Transact SQL: Equivalente a GROUP_CONCAT de MySQL
SELECT
STUFF(
(
SELECT
',' + RTRIM(LTRIM(TELEFONO))
FROM CLIENTE
WHERE CLIENTE = '10655'
ORDER BY TELEFONO FOR xml path('')
)
, 1, 1, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment