Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!
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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|SQl query with join with out having to list all fields in main table.||2||30|
|Replacing unrecognized function name in SQL Query||4||44|
|T-SQL: Need to trim a single leading space||7||56|
|Set a variable value in SQL Procedure||3||25|
Join the community of 500,000 technology professionals and ask your questions.