Subject | Re: [firebird-support] Outer Join |
---|---|
Author | Hans Hoogstraat |
Post date | 2003-11-07T21:47:42Z |
Maybe:
Select Master.Master_ID,
(Select Detail1.Master_ID from Detail1 where Master.Master_ID =
Detail1.Master_ID ) as Detail1,
(Select Detail2.Master_ID from Detail2 where Master.Master_ID =
Detail2.Master_ID ) as Detail2
-----------------------------------
Select Master.Master_ID,
(Select Detail1.Master_ID from Detail1 where Master.Master_ID =
Detail1.Master_ID ) as Detail1,
(Select Detail2.Master_ID from Detail2 where Master.Master_ID =
Detail2.Master_ID ) as Detail2
-----------------------------------
----- Original Message -----
From: "Ed Dressel" <Dressel@...>
To: <firebird-support@yahoogroups.com>
Sent: Friday, November 07, 2003 2:21 PM
Subject: [firebird-support] Outer Join
| I have a master/detail relationship with there being one master table
| and 2 detail tables. Only one of the 2 detail tables can have a
| record matching the master--there may be done. I wanted to find out
| which one did not. I created this query
|
| Select Master.Master_ID,
| Detail1.Master_ID,
| Detail2.Master_ID,
| from Master left join Detail2 on
| (Master.Master_ID = Detail2.Master_ID),
| Master left join Detail1 on
| (Master.Master_ID = Detail1.Master_ID)
|
| I wanted a list of every record in the master, and the 2nd column
| value being not null if it existed in Detail1 and likewise for
| Detail2's column--but I didn't achive this--I got a whole lot more
| records then I wanted.
|
| How can I achieve this?
|
| Thanks
| Ed Dressel
|
|
|
| To unsubscribe from this group, send an email to:
| firebird-support-unsubscribe@yahoogroups.com
|
|
|
| Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|
|
|