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 |
|
PaulTeal
Yak Posting Veteran
67 Posts |
Posted - 2002-11-27 : 14:49:59
|
| Lets say you have two tables,tblEmployees:EmployeeNumber EmployeeName SSN-------------- ------------ ------ 1.00 Bob <NULL> 2.00 Greg <NULL> 3.00 Tonya <NULL>and tblSSN:EmployeeNumber SSN-------------- ----------- 1.00 374-77-1236 2.00 831-75-4256 3.00 784-25-1245I know how to write the query to join the two:SELECT e.EmployeeNumber, e.EmployeeName, s.SSNFROM tblEmployees AS e JOIN tblSSN AS s ON e.EmployeeNumber = s.EmployeeNumberBut I want to write an update statement that will change tblEmployee's SSN column from nulls to the correct social security numbers. None of the update statements in my books use a join to populate data from another table.Paul Tealsql@partytilyoupop.com |
|
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2002-11-27 : 15:23:33
|
| Here is the link about update from other table using join http://www.sqlteam.com/item.asp?ItemID=3876 |
 |
|
|
|
|
|