Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer Join or merge of some sort? 1

Status
Not open for further replies.

JNameNotTaken

Programmer
Aug 29, 2006
24
0
0
IE
Code:
ADDRESS(	Address_ID,	Street,	City )
		          0		A St.	    C1
		          1		B St.	    C1

PROPERTY(	Address_ID,	Prop_Details )
		          0		    D1
		          1		    D2

FLAT(		Address_ID,	Association_Fee )
		          0		    AS1

HOUSE(		Address_ID,	Lot_Size )
		         1		    LS1
Required Output:
Code:
Street,	City,	Prop_Details,	Association_Fee, Lot_Size
A St.	     C1	       D1		   AS1
B St.	     C1	       D2				              LS1
I simply cannot get this output. I have tried various techniques but without success.

If sombody can please explain how to get that required output, it would be a life saver.
Yes, it's college work, not a specific assignment question, rather a hole I backed myself into as part of a larger project.

Thank You.
 
Code:
select a.Street
     , a.City
     , p.Prop_Details
     , f.Association_Fee
     , h.Lot_Size
  from ADDRESS as a
inner
  join PROPERTY as p
    on p.Address_ID = a.Address_ID
left outer
  join FLAT as f
    on f.Address_ID = a.Address_ID
left outer
  join HOUSE as h
    on h.Address_ID = a.Address_ID

r937.com | rudy.ca
 
r937.

You are GOOD.

Worked a charm.

Thank you so much.

Best Wishes.
 
Hey, a supertype/subtype relationship between property and (flat, house)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top