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 |
|
Saeed
Starting Member
39 Posts |
Posted - 2002-09-16 : 19:30:34
|
| Can some one try to help me understand thisUpdate MYTABLE with (ROWLOCK) Set AdjustValue = isnull(AdjustValue,0) - @AICCostWHERE MCCN = @MCCN Does isnull() mean if AdjustValue is null , replace it with a zero ? correct?if sothen AdjustValue =0-@AICCost .No? so why have that lengthy expression instead of AdjustValue =-@AICCostI m sure i m misuderstanding something here with isnull |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-09-16 : 19:56:29
|
| Because AdjustValue = 0-@AICCost is NOT true if Adjust value is NOT null. If you want to subtract @AICCost from AdjustValue, and want it to process Nulls, all in the same query, then what you have is correct. |
 |
|
|
|
|
|