
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trace report
Hi
I have a table that stores trace data like
Levels | TopLevelSegmentResponsGlobId | DestinationSegmentResponseGlobId | SourceSegmentResponseGlobId |
---|---|---|---|
0 | 10002001 | 10002001 | 10003001 |
1 | 10002001 | 10003001 | 10203001 |
1 | 10002001 | 10003001 | 10303001 |
2 | 10002001 | 10203001 | 20203001 |
3 | 10002001 | 10303001 | 99303001 |
4 | 10002001 | 20203001 | 40203001 |
So what I need to dispaly would be something like:
0. 10002001
1. 10003001
2.10203001
3.20203001
4.40203001
2. 10303001
3.99303001
I found a post that use Hierarchy, but I do not get it, so I will ask if any can explain or have anyother suggestion to solution.
TRACE:
Load
*
;
select
[Level] AS Levels
,[TopLevelSegmentResponsGlobId]
,[SourceSegmentResponseGlobId]
,[DestinationSegmentResponseGlobId]
,[SourceMaterialID]
,[SourceLotID]
,[SourceQuantity]
,[SourceUOM]
,[SourceProcessSegment]
,[DestinationProcessSegment]
,[DestinationMaterialID]
,[DestinationLotID]
from [Tracking]
;
Hierarchy(ID, ParentID, Name,,Name,TreeView) Load
Levels as ID,
TopLevelSegmentResponsGlobId as ParentID,
SourceSegmentResponseGlobId as Name
Resident TRACE;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See attached qvw. Is that what you need?
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Gysbert
Thanks for your reply.
That was allmost what I wanted yes.
Tried your solution on some teste data I have.
I tried to create a note showing how I would like it to appear.
Please find below an image that shows this.
What I need is that I also get the top level. This is not to important, I can show this as a single line otherwise.
The main problem is that I need it more organized by levels.
(there is an obvious error in this test data where one destination routes back to toplevel id on source column. Please disregard that)
