I think Oracle OO or object relational was supposed to do this natively, but
as far as i know, it is not possible to do an arbitrary number of dynamic
self-joins in native SQL.

You could always cheat and have a dynamically-sized text field containing a
comma separated list of the parentCategoryID hierarchy :)

Aaron

----- Original Message -----
From: "Ian Buzer" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Thursday, December 23, 2004 8:03 PM
Subject: In One?


> Hi,
>
> This has been bugging me for about 3 years now, and I've finally decided
to see if I can beat it (er... well see if I can find someone else that can
beat it :)
>
> I've got a db table with a typical category heirachy structure:
>
> categoryId, parentCategoryId, categoryName,  etc..
>
> Given a particular categoryId, is it possible to get the path back to the
root category in only one db query? (given that the depth of the category in
the structure is unknown).
>
> Ian



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188613
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to