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

Table update Join Help Required

Status
Not open for further replies.

PaulStasny

Technical User
Mar 6, 2007
1
CA
I am looking to merge missing info into (Notes and Position) from Table 2 into Table 1 and I am rather new to this so I would appreciate any help

Customers Table 1

ID Contact# Name FirstName Address Position
123 0 Microsoft 123 B St 123 1 Gates Bill



Customers Table 2

ID Contact# Name First_Name Address Position
678 0 Microsoft 123 B St
678 2 Gates Bill God
765 0 Chrysler
765 4 Gates Bill 676 G St Janitor

Notes Table 2

ID Number Contact# Note date Note Text
123 0 March 5, 2007 Purchased Denmark
123 1 March 7, 2007 New Wig arrived



Companies and their contacts occupy different rows in the table but share the same ID.
The ID and Contact Numbers are the primary key. I tried joining on the First and Last Names since that is all that distinguishes contacts in the row but that is obviously not enough.

I need to update customer table 1 with the corresponding position in customer table 2 and then change the ID and contact numbers in table 2 to match the corresponding values in table 1. This will let me copy or dts the notes from Table 2 to table 1 and have them match with the correct Companies and contacts . Thanks for any assistance


 
OK you want to update the postion in TABLE1.
I'd join on name,firstname and address.

Why do you need to update ID and Contact# in TABLE2? It seems to me
that you would then have two identical tables...
Table1 and Table2 ...


Also Notes Table2?
Is this a separate table? The IDs and Contact# match
those in table1 already (according to your example)

I'm sorry but I am confused here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top