Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
WITH CTE AS( SELECT Category_ID, Category_Name, Parent_Category_ID, convert(varchar(max),Category_Name) Tree FROM Categories WHERE Parent_Category_ID is null UNION ALL SELECT c.Category_ID, c.Category_Name, c.Parent_Category_ID, p.Tree + ' / ' + convert(varchar(max),c.Category_Name) FROM Categories c JOIN CTE p ON c.Parent_Category_ID = p.Category_ID
Join the community of 500,000 technology professionals and ask your questions.