Need help with Insert Query

  • Thread starter Thread starter news.verizon.net
  • Start date Start date
N

news.verizon.net

Need help with insert query

I have two tables TableA and TableB

TableA
Name: David
Address: 123 West Side
City: New York


TableB
Name: David
Address: 123 West Side
Profession: Engineer

I need to Insert the data from TableB to TableA if the Address matches

I want to get rid of TableB so I want to merge the data from second and add
a
Profession in Table A

So after merging the Table A would be

TableA
Name: David
Address: 123 West Side
City: New York
Profession: Engineer

I would appreciate your help and Thanks in Advance

Nick
 
Need help with insert query

I have two tables TableA and TableB

TableA
Name: David
Address: 123 West Side
City: New York


TableB
Name: David
Address: 123 West Side
Profession: Engineer

I need to Insert the data from TableB to TableA if the Address matches

I think you need two things here. You'll need to open TableA in Design
view and add a Profession field, and then run an Update query by
joining TableA to TableB by Name and Address, and updating
TableA.Profession to TableB.Profession. You'll need a unique Index on
the combination of the two fields for this to be successful.

An Insert query inserts new rows in a table, which isn't what you want
in this case!
 
Back
Top