Stegalex has asked for the
wisdom of the Perl Monks concerning the following question:
I am pretty sure that this is going to entail the use of recursive subroutine calls, but I just can't get my mind around this problem.
I have a self referencing table in Oracle called "CATEGORY". A category can be a sub-category of a sub-category ad nauseum. The problem I have encountered is that Oracle's "ON DELETE CASCADE" referential integrity contstraint doesn't work on self-referencing tables (ORA-2292). So what I need to do is to build a function that will start at a node in the Category tree and delete it and all of its subcategories.
Not looking for you to write my code, just looking for a snippet or a reference to a useful pre-existing module. Thanks all.
I like chicken.