Updat Query table

mothi

Registered User.
Local time
Yesterday, 21:17
Joined
Dec 26, 2009
Messages
111
H, I have two tables

tbl_ new and tbl_copy both have same structure and field names but the data will vary among the tables So

Tbl_ new (id, first name, last name ) has 3 records and

tbl_copy ( id , first nbame, last name) has 2 records .So when you compare the data in both tables tbl_copy has 1 new record which should be added to the tbl_ new . And the other record in the tbl_copy is a common one , i will explain with an example

tbl_new id first name last name
1 john mclaine
2 .... ....
3 ...... ......

tbl_ copy 1 john williams



SO the last name is different in the tbl_copy i need to update that last_ name in the tbl_new. data in all the fields could change. i just 3 fields as an example but my table has a lot of fields so i do not want to go through each field specifically in the table . i just want to add the records with new information in the tbl_copy to the existing records in the tbl_new. How do i need to do that. Please Help me out. Thank you.
 
Hello mothi!
An idopathic question.
1) What is the PRIMARY KEYS in both tables.
2) Do you want to ADD a new record in tblNew, or
you want to change (update) a "Last name" field
in the old record in tblNew???
 

Users who are viewing this thread

Back
Top Bottom