Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hierarchal sort on Table

Status
Not open for further replies.

fcullari

IS-IT--Management
Oct 28, 2002
30
US
I have a table where I need to sort by level 1, then level 2 and 3.
Level 1 - Employee related (Parentid = 0) (Typeid = 39)
Level 2 - New Hire (Parentid = 39) Typeid = 45,46,47)
Level 3 - Bayonne, NJ (Parentid = 45) (Typeid = 48)
Level 3 - Fayetteville, NC (Parentid = 45) (Typeid = 49)
Level 3 - New York, NY (Parentid = 45) (Typeid = 52)
Level 3 - Jacksonville, FL (Parentid = 45) (Typeid = 51)

See Data below. This is all in one table, and is broken down during entry into the table as Type, Subtype and Category. I need a list to check out all the possiblities.
In Track-It you can get this list from the table that has the work orders in it, but not from the table that you use to enter the data. The order of items in the table may not always be sequential, so in looking at the screens you are not always sure you covered all the combinations required.
If someone can help me put this data level 1's are Types, Level 2's are subtypes and level 3's are categories. I need to have a listing by Type, Subtype and category.


PARENTID TYPEID TYPE SPECIALIST LEVELID
0 39 EMPLOYEE RELATED 1
0 61 HARDWARE 1
0 195 SOFTWARE 1
0 587 TECH ADMINISTRATION 1
39 45 New Hire 2
39 46 Relocate Employee 2
39 47 Terminate Employee 2
45 48 Bayonne, NJ Ops & Tech Que Manager 3
45 49 Fayetteville, NC Rodriguez, Enoc Tech 3
45 51 Jacksonville, FL Best, Michael Tech 3
45 52 New York, NY Ops & Tech Que Manager 3
46 53 Bayonne, NJ Ops & Tech Que Manager 3
46 54 Fayetteville, NC Rodriguez, Enoc Tech 3
46 55 Jacksonville, FL Best, Michael Tech 3
46 56 New York, NY Ops & Tech Que Manager 3
47 57 Bayonne, NJ Ops & Tech Que Manager 3
47 58 Fayetteville, NC Rodriguez, Enoc Tech 3
47 59 Jacksonville, FL Best, Michael Tech 3
47 60 New York, NY Ops & Tech Que Manager 3
61 62 Adapters 2
61 64 Antenna 2
61 66 Avery Ticket Machine 2
61 68 Battery 2
61 72 CD Burner 2
61 76 Communications 2
61 77 Copy Machine 2
61 79 Desktops 2
61 80 DVD Burner 2
61 81 Hard Drive 2
61 82 Keyboard 2

 
An example of the expected output would help.

I think that you may want to add in thsi table a second time and join the Parent ID to the Type ID to demonstrate the hierarchy.

But I'm just not sure based on a text description of what you want output.

-k
 
The report I'm looking for is:
Level 1 Item
Level 2's that only belong to Level 1
Level 3's that only belong to Level 2

An example is listed in the beginning of my thread.
 
Have you tried the hierarchical group option? Go to Report ->Hierarchical Grouping Options. I have never used this, so probably cannot help with specifics, but the "Help" files might give you enough direction to do the job. I think you would need to group on Levels 1,2,and 3 before using this option.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top