Skip to content

Instantly share code, notes, and snippets.

@65
Created March 10, 2012 19:59
Show Gist options
  • Save 65/2012764 to your computer and use it in GitHub Desktop.
Save 65/2012764 to your computer and use it in GitHub Desktop.
concatenation of null values in SQL from a join of tables
set CONCAT_NULL_YIELDS_NULL OFF
select distinct (select CategoryName +'/' from Category where CategoryID = epc.CategoryParentID ) + CategoryName as CategoryName
from Category epc
set CONCAT_NULL_YIELDS_NULL OFF
select distinct (select CategoryName +'/' from Category where CategoryID = epc.CategoryParentID ) + CategoryName as CategoryName
from Category epc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment