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 |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2009-03-19 : 14:37:33
|
Is it possible to combine these updates into one?update #Combined_LaborHrsDetailTable set eqemployeehours = Null where eqemployeehours = 0.00update #Combined_LaborHrsDetailTable set eqequipmenthours = Null where eqequipmenthours = 0.00update #Combined_LaborHrsDetailTable set jdeemployeehours = Null where jdeemployeehours = 0.00update #Combined_LaborHrsDetailTable set jdeequipmenthours = Null where jdeequipmenthours = 0.00 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-19 : 14:58:13
|
| [code]update #Combined_LaborHrsDetailTable set eqemployeehours = NULLIF(eqemployeehours,0.00),jdeemployeehours =NULLIF(jdeemployeehours,0.00),eqequipmenthours=NULLIF(eqequipmenthours,0.00),jdeequipmenthours=NULLIF(jdeequipmenthours,0.00) where eqemployeehours = 0.00OR eqequipmenthours = 0.00OR jdeemployeehours = 0.00OR jdeequipmenthours = 0.00[/code] |
 |
|
|
|
|
|