Re: Listing out departments (again)

2002-04-15 Thread Paul Giesenhagen
Phillip, Thanks, interesting post, but the problem is I don't know how many levels there will be .. there could be 1 or there could be 20 sub levels (gawd I hope not, but it needs that flexibility). Your example is a set 1/2/3 . I may need to re-think the whole setup of the database since t

Re: Listing out departments (again)

2002-04-15 Thread Alex
OK. I did not read your entire email. I assume you are trying to recursively lookup items. As someone said oracle CONNECT BY can do this otherwise you might need to to some nested queries. On Mon, 15 Apr 2002, Paul Giesenhagen wrote: > Hmm.. here is what I have: > > department table > id | ti

RE: Listing out departments (again)

2002-04-15 Thread Phillip Broussard
Paul, I think you will want something like this. Dave Watts helped me with it a long time ago. http://www.mail-archive.com/cf-talk@houseoffusion.com/msg06749.html I can help you with it if you need but it is pretty sell spelled out. Phillip > -Original Message- > From: Paul Giesenhag

Re: Listing out departments (again)

2002-04-15 Thread Paul Giesenhagen
Hmm.. here is what I have: department table id | title | description . (all departments go into here ..Fishing, Camping, Rods, Spinning ect..) And the table below from the original message Why would I use the sub object table .. So I would stick EVERY department id in the OWNER table and

Re: Listing out departments (again)

2002-04-15 Thread Alex
you should have 3 tables an owner table (owner and ownerID) a sub object table (subobject and subobjectID) a relationship table (ownwerID and subobjectID are complex primary key ) On Mon, 15 Apr 2002, Paul Giesenhagen wrote: > I have to ask this one again .. I asked this question late Friday a

RE: Listing out departments (again)

2002-04-15 Thread Dave Watts
> I have to ask this one again .. I asked this question late > Friday and didn't get any answers that actually fit my > situation. I will try to have this question make sense. You might want to take a look at the Nested Tree Model. There's a good implementation, with details, here: http://www.

RE: Listing out departments (again)

2002-04-15 Thread Carlisle, Eric
If you're using Oracle, look up the "CONNECT BY" SQL+ feature. You can easily draw out trees of parent/child categories. http://www.orafaq.com/faqsql.htm#TREE If not, look into sql self joins. That's a good way of denormalizing parent/child data in the same table. In fact, here's a good link f