Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
TP_MMo
Starting Member
1 Post |
Posted - 2009-05-13 : 10:14:18
|
| The SQL person just left and I'm left holding the bag until they are replaced.In the meantime I need to update a column in a table using data from another table using SQL Management Studio. Logically this seems easy, but I am having trouble executing it.I have two tables with ContID (unique identifier) and DoNotMail in common. I need to update the DoNotMail column in Table_2009 using the DoNotMail information from Table_2008 based upon the ContID. ContID is not in exact order across both tables and has approx 300,000 records.Here is an example of my tables:Table_2008ContID212231000074212091002335180611000746212151001092212151001090DoNotMailNULLXXNULLNULLTable_2008ContID180611000746212091002335212151001090212231000074212151001092DoNotMailNULLNULLNULLNULLNULLPlease help!Thanks,Mary |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-13 : 10:19:43
|
| [code]UPDATE t2SET t2.DoNotMail =t1.DoNotMail FROM Table_2008 t1JOIN Table_2009 t2ON t2.ContID =t1.ContID [/code] |
 |
|
|
|
|
|