Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
paul.rowling
Yak Posting Veteran
81 Posts |
Posted - 2003-04-10 : 07:44:10
|
| Hi,I have two tables, a customer table and another table called pro.I want to be able to find all those customers in pro where the following fields = the same fields in the customer table:ForenameSurnameCompany_NameBoth tables have a customer_id for each customer although the customer id's in the customer table don't correspond to the customer id's of the same person in the pro table.I think this should be simple, but I've been thinking about it too much and I've got myself confused. I also need to make sure that this is accurate.CheersPaul |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-04-10 : 08:08:24
|
| I am not quite sure of the question, but is this something close to what you want?SELECT Pro.* FROMPro INNER JOIN CustomerON Pro.ForeName = Customer.ForeNameAND Pro.Surname = Customer.SurnameAND Pro.CompanyName = Customer.CompanyNameOS |
 |
|
|
paul.rowling
Yak Posting Veteran
81 Posts |
Posted - 2003-04-10 : 08:34:48
|
| Hi Mohdowais,I think this is what I need, I didn't know that you could join on more than one field.ThanksPaul |
 |
|
|
|
|
|