Skip to content

Instantly share code, notes, and snippets.

@DoubleBrotherProgrammer
Created May 11, 2010 18:58
Show Gist options
  • Save DoubleBrotherProgrammer/397693 to your computer and use it in GitHub Desktop.
Save DoubleBrotherProgrammer/397693 to your computer and use it in GitHub Desktop.
USE AdventureWorks;
-- create a comma delimited list of CountryRegionCode per CurrencyCode
SELECT CurrencyCode,
MAX( COALESCE( CountryRegionCode + ', ', '') + CountryRegionCode ) AS 'RegionCodes'
FROM Sales.CountryRegionCurrency
GROUP BY CurrencyCode;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment