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 |
poser
Posting Yak Master
124 Posts |
Posted - 2008-11-07 : 11:07:26
|
Hello, and yes I'm still just learning ;)I have two tablesEmpID match in both tables so can be joined by them.Table 1: EmployeeColumns are EmpID IsHere IsNotHere 1 Y N 2 N YTable 2: Employee1Columns are EmpID IsHere IsNotHere 1 N N 2 Y NI need to update Employee1.IsHere, Employee1.IsNotHereFrom Employee.IsHere, Employee,IsNotHereThere are a thousand rows in my table.TIA/P |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-07 : 11:10:11
|
[code]UPDATE t1SET t1.IsNere=t2.IsHere,t1.IsNotHere=t2.IsNotHereFROM table1 t1INNER JOIN table2 t2ON t2.EmpID=t1.EmpID[/code] |
|
|
poser
Posting Yak Master
124 Posts |
Posted - 2008-11-07 : 11:58:30
|
Thank you, Thank you, Thank you...R/P |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-07 : 12:00:22
|
Cheers,Cheers,Cheers... |
|
|
|
|
|