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: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};
I know that Sybase, SQL Server, Postgres and Oracle all support ANSI joins, and I suspect there are others as well.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
-----
"Computeri non cogitant, ergo non sunt"
In reply to Re: Reading Database with Outer Joins
by cadfael
in thread Reading Database with Outer Joins
by Ananda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |