in reply to Reading Database with Outer Joins

my $SQL_query; $SQL_query = qq {SELECT A.DISPLAY_ORDER, A.NAME PARENT_NAME, B.NAME CHILD_NAME FROM CATEGORY A, CATEGORY B WHERE B.ID_PARENT_CATEGORY(+) = A.ID_CATEGORY AND A.DISPLAY_ORDER != -1 ORDER BY DISPLAY_ORDER};
Just a suggestion -- Oracle, SQL Server, Sybase, and others tend to use idiosyncratic ways of expressing joins. Using the ANSI join specifications will make your code more portable between RDBMS implementations. For example:
SELECT A.DISPLAY_ORDER, A.NAME PARENT_NAME, B.NAME CHILD_NAME FROM CATEGORY A LEFT OUTER JOIN CATEGORY B ON B.ID_PARENT_CATEGORY = A.ID_CATEGORY
I know that Sybase, SQL Server, Postgres and Oracle all support ANSI joins, and I suspect there are others as well.

-----
"Computeri non cogitant, ergo non sunt"

Replies are listed 'Best First'.
Re: Reading Database with Outer Joins
by smersh (Friar) on Jan 13, 2003 at 21:24 UTC
    I agree that ANSI syntax is more portable (and less confusing when you work on multiple platforms), but I believe that this form is not supported by Oracle 8i (it does work in 9i).

    smersh