Forum Moderators: phranque
bedroom,1,null
bed,2,1
sheet,3,2
I would like to write some sql that could print out the following.
bedroom
bedroom>bed
bedroom>bed>sheet
I have no idea how to do this... could someone lend a helping hand?
thanks... if this isnt the right forum could you point me in the right direction.
If I had the following records:
bedroom,1,null
bed,2,1
sheet,3,2
lint,4,3
it wouldnt work with the solution given.
I was really looking for a recursive solution.
hehe.. you might find the same question a few places, I have been searching all day for the answer (well actually I was hoping someone else would figure it out).
-jmirick
You can write SQL that would work against a given depth, but not an arbitrary depth.
Relational purists don't like SQL for the reason that it can't do this sort of breakdown.