Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

TSQL Challenge 60 - Generate a relational tree structure from a string

By Jacob Sebastian,

TSQL Challenge 60 - Generate a relational tree structure from a string

An ETL application receives product and category information in a text file. The category hierarchy is specified as a string. Your job is to read the hierarchy information and generate a relational table (result set) representing the hierarchy of categories.


Total article views: 943 | Views in the last 30 days: 1
Related Articles

Get products ordered by category order

Products ranked by category ranked


Table Hierarchy updated

Recently a need resurfaced to explore the foreign key tree (hierarchy/genealogy) as it related to a ...


Export/import relational data across SQL Servers

The XportXML utility, will help you copy relational data (a bunch of related tables) to another SQL ...


Category, Sub Category and Article Relation

Hi everyone I want to know what would be best practice for the following scenario: Article tab...


Manipulate Horizontal Hierarchy with UNPIVOT

Convert Horizontal Hierarchy to vertical Hierarchy.


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones