Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle8i Left Join Question
Hello,
I know that Oracle 8i uses the notation = (+) for left Joins and that Oracle 9i uses the SQL LEFT OUTER JOIN syntax for this. Now I want to be able to do the left Join without using any of these two operators so as to obtain database independence in my implementation.
Thinking along these lines I notice that postgresql allows me to do the following but Oracle8 complains about NULL being an incompatible datatype with the other column above:
(SELECT A, B FROM T) UNION (SELECT A, NULL FROM T) The above is a simplification of what needs to be done to obtain the left outer join effect without using the = (+) or ANSI syntax.
Here is what I get: ORA-01790: expression must have same datatype as corresponding expression
Is there a way to circumvent this error in Oracle (other than using the join syntax)???
After all, why should NULL be incompatible with a column: even if the column is not null the outer joins are still allowed so...
Thanks,
Neil Received on Tue Nov 20 2001 - 06:50:33 CST
![]() |
![]() |