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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle8i Left Join Question

Re: Oracle8i Left Join Question

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Tue, 20 Nov 2001 14:09:05 GMT
Message-ID: <5utK7.50802$XJ4.29682090@news1.sttln1.wa.home.com>


What is the column type for B? Is it a LOB? Jim
"Neil Zanella" <nzanella_at_garfield.cs.mun.ca> wrote in message news:Pine.LNX.4.30.0111200913480.1522-100000_at_garfield.cs.mun.ca...
>
> 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 - 08:09:05 CST

Original text of this message

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