[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQL Question: How the outer join works
- Subject: Re: SQL Question: How the outer join works
- From: anil kalidindi <kvsanil@HOTMAIL.COM>
- Date: Fri, 30 Jul 1999 10:46:44 PDT
Hi joe,
Which ever side you put the + sign, all the records on that side would
appear and if they dont have an equal record in the other table it would
still be given to you but null or blank fills up the non matching fields.
I hope you got what i am saying. If you still didnt get it let me know i
will explain with more examples.
Anil Kalidindi.
Novasoft
>>From: Rosie ODonnell <joe.patton@NA.MARCONICOMMS.COM>
>>Reply-To: SQR-USERS@list.iex.net
>>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>>Subject: SQL Question: How the outer join works
>>Date: Fri, 30 Jul 1999 13:20:56 -0400
>>
>>CSS HRizon 8.00h
>>Oracle 7.3.2
>>HP-UX 10.20
>>SQRW 3.0.13.2
>>
>>I'm trying to figure out if a Reporting tool that I use(Reportsmith)
>>handles
>>outer joins properly, and I also need a better understanding of which side
>>to
>>put the (+) on when using an outer join. Here is my situation:
>>
>>SELECT JOB.ACTION, JOB.DEPTID, JOB.EMPLID, ACT.DESCR,
>>PV_PERSONAL_DATA.NAME
>>FROM
>>PS_JOB JOB, PS_ACTN_REASON_TBL ACT, PV_PERSONAL_DATA PERS
>>WHERE
>>JOB.EFFDT BETWEEN '01-APR-1998' AND '31-MAR-1999'
>>AND JOB.EMPL_CLASS IN ( 'A', 'E')
>>AND JOB.ACTION IN ( 'TER', 'RET')
>>AND JOB.EMPLID = PV_PERSONAL_DATA.EMPLID
>>AND JOB.ACTION = ACT.ACTION
>>AND JOB.ACTION_REASON = ACT.ACTION_REASON(+)
>>ORDER BY
>>JOB.REPORTING_LOCATION, JOB.EMPL_TYPE, PERS.NAME
>>
>>I am referencing the ps_actn_reason_tbl just to get a description. Some
>>of
>>the
>>job records have null ACTION_REASON fields, so they won't link with the
>>action/reason table. Which side to I place the (+) on to make sure that
>>the job
>>records with the blank action_reason field still show up in the query
>>results?
>>
>>Thanks,
>>
>>Joe Patton
>>Marconi Communications
>
>
>_______________________________________________________________
>Get Free Email and Do More On The Web. Visit http://www.msn.com
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com