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.

http://beyondrelational.com/puzzles/tsql/60/english/generate-a-relational-tree-structure-from-a-string.aspx

 

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

Get products ordered by category order

Products ranked by category ranked

SCRIPT

Export/import relational data across SQL Servers

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

BLOG

Table Hierarchy updated

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

FORUM

Category, Sub Category and Article Relation

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

SCRIPT

Manipulate Horizontal Hierarchy with UNPIVOT

Convert Horizontal Hierarchy to vertical Hierarchy.

Tags
 
Contribute

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
Editor, SQLServerCentral.com

Already a member? Jump in:

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