Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORACLE 7.3 using ODBC and Left Outer Joins...
> SELECT S.SECTIONNUM, S.UPSECTION, S.PIECE, S.SECT_TYPE, S.CONDUCTOR AS
> SectionConductor, S.PHASE, S.MAPNAME, C.CONDUCTOR AS ConductorConductor FROM
> {oj SECTIONS S LEFT OUTER JOIN CONDUCTO C ON S.CONDUCTOR = C.CONDUCTOR}
> WHERE S.SECTIONNUM <> '-1' OR S.SECTIONNUM IS Null ORDER BY S.SECTIONNUM,
> S.PIECE
>
> SQLSTATE: S1000
> Native Error Code: 1719
> Driver Message:[Oracle]ODBC Oracle Driver][Oracle OCI][ORA-01719: outer join
> operator (+) not allows in operand of OR or IN.
The relevant part of this is ORA-01719: outer join operator (+) ...
A column which may be populated by an outer join cannot be used in an OR or IN statement. So the hangup is: WHERE S.SECTIONNUM <> '-1' OR S.SECTIONNUM IS Null
This WHERE clause does not make much sense anyway, because 'OR S.SECTIONNUM IS Null' is redundant. NULL does not equal '-1'. So if you just say WHERE S.SECTIONNUM <> '-1', then you get the rows where SECTIONNUM is NULL as well. Received on Mon Apr 05 1999 - 23:37:48 CDT