×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
If you are building a Recursive CTE to do your explosion, you can concat a set of '...' for each new level if you are looking for an indented look. Also you my need the clause "SEARCH DEPTH FIRST" at the end so that it orders in the way you want.
"Using recursive queries" at
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/sqlp/rbafyrecursivequeries.htm
Should help you with some examples.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Gqcy
Sent: Wednesday, April 10, 2013 12:53 PM
To: midrange-l@xxxxxxxxxxxx
Subject: SQL to generate a "indented" bill of material listing.
we have found a quick method get generate a bill of material (BOM) list in pure SQL, but we can't get it ordered in a "indented" manner.
I figure we need to add a work file that will keep track of the parent-child, level... but don't know how to build it...
I have searched terms such as "hierarchial data", "Path Enumeration","materialized path", "adjacency lists"
but I can't flush out quite what I need...
Item 1
... Child item 1
........ a child of a child
... Child item 2
... etc...
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.