Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Self/Outer Join
Try using
AND T.GLOBAL_NAME(+) = 'TEST.WORLD' instead of
AND T.GLOBAL_NAME = 'TEST.WORLD'.
Coz when the outer join works (for a row) it considers that no
information is present in the second table, so you cant restrict
t.global_name as ( you are selecting the rows of table p not present in
table t).
In article <7tr8sv$1r6$1_at_bgtnsc02.worldnet.att.net>,
"Jill" <jc_va_at_hotmail.com> wrote:
> Please replace the bad code with this. I left out a line.
>
> SELECT
> P.NAME
> ,P.EMPLID
> ,P.ERNCD
> ,0 AS TST_HRS
> ,0. AS TST_PAY
> ,0. AS TST_ERN
> ,P.OTH_HRS AS PRD_HRS
> ,P.OTH_PAY AS PRD_PAY
> ,P.OTH_EARNS AS PRD_ERN
> FROM PR_COMP P
> ,PR_COMP T
> WHERE P.GLOBAL_NAME = 'PROD.WORLD'
> AND T.GLOBAL_NAME = 'TEST.WORLD' <-------------
> AND P.EMPLID = T.EMPLID (+)
> AND P.ERNCD = T.ERNCD (+)
> AND T.EMPLID IS NULL
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 11 1999 - 05:54:29 CDT