Re: Connect by Clause?? Whoo-Nelly.....

From: Treo <treoo0_at_yahoo.com>
Date: 19 Jul 2002 13:49:45 -0700
Message-ID: <c631ca9c.0207191249.52bc65c1_at_posting.google.com>


Thanks, Chris. I'll check it out!
Treo



chris_at_databaseguy.com (Chris Leonard) wrote in message news:<b8cc3cda.0207181147.30824d6e_at_posting.google.com>...
> Try this:
>
> select max(new_site_key)
> from site_history
> connect by prior new_site_key = site_key
> start with site_key =
> (select site_key
> from group_upload
> where group_num = '&USER_INPUT')
>
> Hope this helps,
> Chris
> __________________________________
> Chris Leonard
> MCSE, MCDBA, MCT, OCP, CIW
> The Database Guy at PPI
> http://www.propoint.com
> Brainbench MVP for Oracle Admin
> http://www.brainbench.com
>
>
> treoo0_at_yahoo.com (Treo) wrote in message news:<c631ca9c.0207180512.3c8db874_at_posting.google.com>...
> > ((can use Access's 'pass-through' query to utilize Oracle's
> > functions))
> >
> > Greetings,
> >
> > Connect-by clause?? Seriously lost.....any syntax please....
> >
> > 2 tables:
> >
> > Group_Upload Site_History
> > ------------ ------------
> > Group_Num Site_Key
> > Site_Key New_Site_Key
> >
> > A user will upload a group of Site Keys in the Group_Upload table, and
> > specify the group using Group_Num. What I need help w/ is as
> > follows...
> >
> > (probably using connect by clause??)
> >
> > If the Tables looked like this:
> >
> > Site_History | Group_Upload
> > ---------------------- | ---------------------
> > Site_Key | New_Site_Key | Group_Num | Site_Key
> > 1 | 2 | ABC44 | 1
> > 2 | 3 | |
> > 3 | 4 | |
> >
> > User specifies Group_Num "ABC44" and the Site_Key in Group_Upload
> > table was "1", then it would return "4" (don't need 2 or 3 nodes, just
> > the final "Leaf"...
> >
> > Any gurus help w/ this? Thanks (more than you could know!)
Received on Fri Jul 19 2002 - 22:49:45 CEST

Original text of this message