I would try "Trees in SQL" in Google search. http://www.intelligententerprise.com/001020/celko1_1.shtml RRR
Ben Petersen wrote: > > Hi all. Looking at the snippit of data records below, how would a > person do a select that, using ID3 data, would return ID2 (and not > ID1)? > > Working from the bottom up, you can count on the two numerics of > each record being bounded by the next record, ie 4 and 11 of ID2 > would enclose 7 and 8 of ID3... 1 and 12 of ID1 enclose 4 and 11 of > ID2. > > So, if you only knew the values of ID3, how would you construct a > select that only returned ID2? I can do it in two steps (I think), but > would rather one. > > ID1,1,12 > ID2,4,11 > ID3,7,8 > > tia, > > Ben Petersen > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l
