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: Complex Join problem with 1 lookup table any ideas?

Re: Complex Join problem with 1 lookup table any ideas?

From: Ed Prochak <edprochak_at_magicinterface.com>
Date: Mon, 08 Apr 2002 01:59:53 GMT
Message-ID: <3CB1259A.FC69A98A@magicinterface.com>

Darryl Grubbs wrote:
>
> asd_at_sds.com (fd) wrote in message news:<3caae9fc$0$2125$45beb828_at_newscene.com>...
> > Using Oracle 8i 8.1.6
> >
> > We have a dimension table emergency_role

> >
> >
> > What is the proper way to do this join with just one lookup table
> > emergency_role?
>
> You will need to use the emergency_role table twice:
>
> select b.employee_id, b.address, a.emergency_role_name,
> c.emergency_role_name from emergency_role a, emergency_responder b,
> emergency_role c where
> b.emergency_position_seq_number = a.Emergency_sq(+) and
> b.alternate_position_seq_number = c.Emergency_sq(+)

good catch. I missed the outer join requirement.

-- 
Edward J. Prochak   --- Magic Interface, Ltd.
Ofc: 440-498-3700
on the web at       --- http://www.magicinterface.com
email: ed.prochak_at_magicinterface.com
Received on Sun Apr 07 2002 - 20:59:53 CDT

Original text of this message

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