> In oracle I would do something like this using hierarchical queries -
> select thing_id from ThingCategery where category_id in (
> select "Animal" from dual UNION
> select subcategory_id from Subcategory
> start with category_id = "Animal"
> connect by category_id = prior subcategory_id
> )
Won't work.
(a) The depth is variable, so the approach illustrated cannot be applied.
See "explosion of parts" in most editions of C.J.Date's "Introduction to
Database Systems". Oracle 8i does have tree-walking capabilities but see
(c).
(b) Some people don't use Oracle because (1) it is grossly overpriced (2)
the drivers are marginal (3) Oracle Corporation randomly changes the licence
terms to improve revenues.
(c) Not even remotely portable. Except for blobs (no option) it is a bad
idea to use anything but ANSI SQL.
Forgive me my short temper and bad puns. I have explained exactly this about
five hundred times to colleagues at work (about three hundred times to the
same four people) and am accustomed to better from the jBoss community. It
has got to the point where I had to substitute Interbase and hide the
manuals to force them to stick to ANSI SQL.
Did anyone notice my anti-Oracle sentiments? ;-) A full rant can be had on
my website...only kidding.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]