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

Table Joins

Status
Not open for further replies.

scabral79

MIS
May 16, 2007
25
US
Hi,

If i have the following 2 tables in a database:

Table 1
Cust_ID Contract_ID Facility_ID
10 1 4
10 2 40
10 3 150
10 4 150
10 5 150

Table 2
Cust_ID Facility_ID
10 4
10 40
10 150


How do i join both table and get only the five rows with the contract_id from Table 1 without duplicates?
 
What have you tried so far?

< M!ke >
[small]"Oops" is never a good thing.[/small]
 
look up left join in BOL

"NOTHING is more important in a database than integrity." ESquared
 
Why?
You have all information in Table 1?
Unless you didn't tell us something else
:)

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
Microsoft MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top