• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Data result tree transform algorithm

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The result set like below

L1 L2 L3
1 11 111
1 11 112
1 12 121
1 12 123
...
2 21 211
2 21 222
........

Need to output as tree,
output as tree,
L1 L2 L3

1 11 111,112
12 121,123
2 21 221, 222
..........


I can think the basic idea for that to convert it as tree, but a lot of checking and seems very complexity.

it seems a general operation after DB extraction and wonder if there is better or existing soluation?

Thanks!
[ July 18, 2005: Message edited by: Steve Jiang ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steve,
Any available solutions probably depend on the output format. What are you trying to create? A web page? A Swing app? Plain text?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic