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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer Join?

Status
Not open for further replies.

j2bailey

Programmer
Joined
Sep 19, 2001
Messages
2
Location
KY
I have the following tables

TABLE 1
--------
letter date value
------ ---- -----
A d1 1
A d1 4
A d2 3
B d1 3
B d1 5
B d2 4
B d2 5
B d3 5


TABLE 2
-------
friend1 friend2
------- -------
A B
B C


The result I want returns the matching pairs (where date = date) for each group of friends. (hard to explain)

The result for the above example should be
friend1 friend2 date value1 value2
------- ------- ---- ------ ------
A B d1 1 3 (or 5)
A B d1 4 5 (or 3-not same as above)
A B d2 3 4 (or 5)

Does that make sense?? I want a 1-1 relationship. (id there's only one value for A on a certain date I only what one value for B on that same date - even if they are more )


Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top