Skip to content

Instantly share code, notes, and snippets.

@HH5HH
Created May 11, 2010 18:58
Show Gist options
  • Select an option

  • Save HH5HH/397693 to your computer and use it in GitHub Desktop.

Select an option

Save HH5HH/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