dbTalk Databases Forums  

Single table shape syntax for treeview

comp.databases.olap comp.databases.olap


Discuss Single table shape syntax for treeview in the comp.databases.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Borg Vomit
 
Posts: n/a

Default Single table shape syntax for treeview - 12-02-2003 , 10:45 PM






Hi all,


I'm trying to load a tree of product categories from a single table,
in two different ways...first a tree of categories and subcategories
only:


idCategory Desc idparent
1 root 0
2 books 1
3 sci-fi books 2
4 robot books 3
5 Candy 1
6 chocolate 5
7 hard candy 5



The root has 2 subcategories "books" and "candy"

"books" has 1 subcategory "scif-fi" and "sci-fi" has 1, "robot books"

"candy" has 2 subcategories "chocolate" and "hard candy"


I got close but I got repeating values


Next same as above only with the products included.


I've played with the VB data environment for a week or so and it's
just not coming together...

TIA

BG

Reply With Quote
  #2  
Old   
Joerg Narr
 
Posts: n/a

Default Re: Single table shape syntax for treeview - 12-04-2003 , 03:09 AM






Hi Borg,

I don't know which tool you are using but most tools are either support a
tabular input of the following form

books | Sci-fi books | robot books
Candy | Chocolate | <null>
Candy | hard candy | <null>

or a recusive structure like

books | sci-fi books
sci-fi books| robot books
Candy | chocolate
Candy | hard candy

Some tools require an explicit top- or root element which would require a
first column "Total products" in the first table and (maybe some additional
starting rows) for the second table like:

Total products | Total products
Total products | books
Total products | Candy

Hope this helps,

Kind regards Joerg



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.