Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: 944 | Views in the last 30 days: 1
 
Related Articles
FORUM

Get products ordered by category order

Products ranked by category ranked

BLOG

Table Hierarchy updated

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

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 ...

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