Let's say , I have two table with same schema but different data .
Table_A and Table_B .
Table_A
--------
ID(p_key) Number(p_key) Column3 Column4
-----------------------------------------------------
ID1 1 AAA BBB
ID1 2 CCC DDD
ID2 1 EEE FFF
ID2 2 GGG HHH
-
Table_B
--------
ID(p_key) Number(p_key) Column3 Column4
-----------------------------------------------------
ID1 1 AAA_1 BBB_1
ID1 2 CCC_1 DDD_1
ID2 1 EEE_1 FFF_1
ID2 2 GGG_1 HHH_1
I want to export(overwrite) Table_B column3 data to Table_A column3 , where ID and Number Columns data are equal .
After executing of script , Table_A's data should be ,
Table_A
--------
ID(p_key) Number(p_key) Column3 Column4
-----------------------------------------------------
ID1 1 AAA_1 BBB
ID1 2 CCC_1 DDD
ID2 1 EEE_1 FFF
ID2 2 GGG_1 HHH
How can I make this using sql script only ?
I use MS SQL-Server 2008 R2 .