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: BN <BN_at_BN.COMO>
Date: Fri, 16 Sep 2005 22:27:10 -0400
Message-ID: <11imvnvf8no6s86@news.supernews.com>


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
>
Received on Fri Sep 16 2005 - 21:27:10 CDT

Original text of this message

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