Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Very perplexing select Problem

Re: Very perplexing select Problem

From: William Robertson <william.robertson_at_bigfoot.com>
Date: 18 Sep 2005 17:01:12 -0700
Message-ID: <1127087697.706646.58470@g43g2000cwa.googlegroups.com>


BN wrote:
> Is this SQL statement portable? I am sorry but I should have mentioned
> that. Powers to be require that the SQL is portable to other RDBMS.
>
> After the fiasco here 5 years ago with developers using SQL Server
> specific features no one wants to repeat this. That app become
> impossible to port to other backend databases if customers want your app
> against another database.
>
> Oracle is great and is our primary choice. But if the customer wants to
> use your app against their own db that they pay for like DB2 or a free
> one then you have to allow for that. I think even SAP allows you the
> flexibility to use many databases.
>
> Can this be done anyother way?
>
> Kris wrote:
> > try the following SQL
> >
> > select level,decode(level,1,'PARENT','CHILD'), rec_id, parent_id from
> > TABLE_REC start with parent_id = 0
> > connect by prior rec_id = parent_id
> >
> > This will give hierarchical ordering of parent/children/grandchildren
> > etc etc (level will tell you what hierarchical level they are at) ..
> >
> > Hope it helps
> >
> > Regards,
> > Gopal Krishan
> >

Better not use joins then ;-)
http://oracle-wtf.blogspot.com/2005/09/joins-explained.html Received on Sun Sep 18 2005 - 19:01:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US