Ok - I follow. I've seen trees implemented in SQL Server, but in order to do so, you'll need to do use some stored procedures. If you could give an example of what your data needs to look like in the end, someone could probably give some advice on the necessary SQL.
----- Original Message ----- From: "Dave Cahall" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 5:46 PM Subject: RE: Oracle hierarchical (connect by) queries > Oracle has a proprietary hierarchical command that is similar to a "tree" > but it is not supported by any other database that I am aware of. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of BILLY CRAVENS > Sent: Tuesday, December 04, 2001 4:58 PM > To: [EMAIL PROTECTED] > Subject: Re: Oracle hierarchical (connect by) queries > > > I think something like this is what you're looking for: > (my Oracle knowledge isn't too deep, but it looks like you're just grabbing > all employees that are managers) > > select e.emp_id, e.mgr_emp_id > from persons e > join persons m > on m.mgr_emp_id = e.prior_emp_id > > > ----- Original Message ----- > From: "Levi Taylor" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, December 04, 2001 4:52 PM > Subject: Oracle hierarchical (connect by) queries > > > > Hi, > > Does anyone know if SQL Server has an equivalent to Oracle's 'hierarchical > > queries'? > > > > Oracle Example: > > select emp_id, mgr_emp_id > > from persons > > start with emp_id = 123456 > > connect by prior_emp_id = mgr_emp_id > > > > Looking for a way to do this in SQL Server. > > > > Thanks! > > > > Levi > > > > > > > > ===== > > Levi Taylor > > <cf_coldfusion_developer> > > http://www.esoftsolutions.com > > > > __________________________________________________ > > Do You Yahoo!? > > Buy the perfect holiday gifts at Yahoo! Shopping. > > http://shopping.yahoo.com > > > > ------------------------------------------------------------------------- > > This email server is running an evaluation copy of the MailShield anti- > > spam software. Please contact your email administrator if you have any > > questions about this message. MailShield product info: www.mailshield.com > > > > ----------------------------------------------- > > To post, send email to [EMAIL PROTECTED] > > To subscribe / unsubscribe: http://www.dfwcfug.org > > > > ------------------------------------------------------------------------- > This email server is running an evaluation copy of the MailShield anti- > spam software. Please contact your email administrator if you have any > questions about this message. MailShield product info: www.mailshield.com > > ----------------------------------------------- > To post, send email to [EMAIL PROTECTED] > To subscribe / unsubscribe: http://www.dfwcfug.org > > > ------------------------------------------------------------------------- > This email server is running an evaluation copy of the MailShield anti- > spam software. Please contact your email administrator if you have any > questions about this message. MailShield product info: www.mailshield.com > > ----------------------------------------------- > To post, send email to [EMAIL PROTECTED] > To subscribe / unsubscribe: http://www.dfwcfug.org > ------------------------------------------------------------------------- This email server is running an evaluation copy of the MailShield anti- spam software. Please contact your email administrator if you have any questions about this message. MailShield product info: www.mailshield.com ----------------------------------------------- To post, send email to [EMAIL PROTECTED] To subscribe / unsubscribe: http://www.dfwcfug.org
