Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Tree Structure and Db

by sharkey (Scribe)
on Jul 06, 2005 at 02:08 UTC ( #472660=note: print w/ replies, xml ) Need Help??


in reply to Tree Structure and Db

This probably won't help you, but...

If you happen to be using Oracle or DB2, those databases have SQL extensions to do tree structured queries, based on a table like you describe.

The syntaxes are radically different, so your best bet is to look it up in your database documentation. For Oracle the keyword is "CONNECT BY", and for DB2 the keyword is "WITH".

Here's a nice overview: http://www.oreilly.com/catalog/sqlpr/chapter/ch01.pdf


Comment on Re: Tree Structure and Db
Re^2: Tree Structure and Db
by hartwig (Sexton) on Jul 07, 2005 at 11:21 UTC
    CONNECT BY is not working very well in oracle 9.2 - in oracle 8.X its OK. This is a bug in oracle 9.2 (also admited by oracle ;)) -
    What kind of DB are you using?
    Best regards
    Hartwig
      I use MySQL 4.x

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://472660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-12-21 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls