Multi Table Join

From: <galigian_at_on.bell.ca>
Date: 1995/07/06
Message-ID: <DBAv5E.1sF_at_on.bell.ca>#1/1


Here's one for you guys. I need to perform a multi table join. For example, the tables are as follows.

Table A (Primary)       Table B            Table C
-----------------       -------            -------
Key = NAME              NAME               NAME
                        HOURS_WORKED       EXPENSES
                        DATE                    



The relationship between A and B is one to many , and the relationship between A and C is one to many.

I need to construct a join that links the two tables. All my attempts up to this point have failed. I'm getting duplicate rows of the join. For example

NAME DATE HOURS_WORKED EXPENSES ---- ----- ------------ --------

John    Jan25       7.5            20
John    Jan26       7.5            20
John    Jan27       7.5            20


John has only one expense item for $20.00, yet it appears three times after the join. I need it to appear only once. They join that failed looked as follows.

select a.name, b.date,b.hours,c.expenses from a,b,c
where a.name = b.name
and a.name = c.name

How can I get a multi table join to not
return duplicate rows of information?

It's difficult to illustrate my problem. I hope I have made it pretty clear.

PLEASE POST YOUR REPLIES TO THE NEWSGROUP  or
SEND ME MAIL AT: GALIGIAN _at_ POST.SYGMA.NET

Thanks Received on Thu Jul 06 1995 - 00:00:00 CEST

Original text of this message