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 |
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2010-10-18 : 19:18:43
|
I have a temp table #TmpTabletmp_ID INT,bt1 BIT,bt2 BIT,bt3 BITThe tmp_ID is populated, the bits are all set to 0Now I have another table, MyTableMyTable_IDtmp_IDMyINTI need to go through all the rows in MyTable.If MyINT = 3, update #TmpTable. Set bt3 = 1 where tmp_ID = tmp_IDTrouble I am having is the best way to loop through MyTable.Thanks,Zath |
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2010-10-18 : 19:43:58
|
Ok, I got it working!!! |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-10-19 : 13:13:58
|
no need of loop. you can do batch updation itself using an UPDATE statement------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|