Originally Posted by
marnelle
thanks for your reply guyz, that quote in above is that what the situation i mean BUT there are primary keys in the masterlist table which is not included in the new value list table
example
MasterlistTable
Primarykey---name---- Country
1------------ bob------Cuba
2------------ robert----Panama
3------------ Martha---Iceland
4------------ John---- -Japan
5------------ Shane----USA
New_value_List_Table
PrimaryKey----name----country
1-------------bob----- Greenland
2-------------robert----Panama
4-------------John-----North Korea
5------------ Shane----Autralia
ok guyz, thats an example, you see the primary key #3 in the new_value_list_table is gone compared to masterlistTable.
so, i just wanna ask, Is there any script that will compare two tables and look for the same primary keys and change the data of one column of the table you specify?..glad that i hear a lot from you guyz,..........many thanks
As previosuly suggested, you would use an update query joinng on the primary key field.
Example:
Code:
UPDATE tblMasterList INNER JOIN tblNewValuesList ON tblMasterList.MasterLisrID = tblNewValuesList.NewValueLisrID SET tblMasterList.MasterListCountry = [tblNewValuesList].[NewValueListCountry]
WHERE (((tblMasterList.MasterListCountry)<>[tblNewValuesList].[NewValueListCountry]));