Skip to content

Instantly share code, notes, and snippets.

@dalmat36
Created March 15, 2014 15:24
Show Gist options
  • Save dalmat36/9568965 to your computer and use it in GitHub Desktop.
Save dalmat36/9568965 to your computer and use it in GitHub Desktop.
SQL Server 2012 Concat function
/*CONCAT function (2012)
Handles replacing nulls*/
Use TSQL2012
SELECT custid, country, region, city,
CONCAT(country, N',' + region, N',' + city)
AS location
FROM Sales.Customers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment