views:

40

answers:

2

I am trying to run an update statement as follows...

UPDATE tblDeductionSystem 
   SET [ORDER] = [0RDER] + 6 
 WHERE [ORDER] >= 7 
   AND ScoringCriteriaTypeID = @CheerDeductionScoreSheetID

Sql Server if giving me invalid column name ORDER. I thought if I delimited the reserved word with the square brackets this would work.

+1  A: 

What is [0RDER]? Is it yet another column? See this zero in there? 0 vs. O. Perhaps you need to change the font of your favorite sql editor.

On a side note, you see it just so happens that 0 and O are close together on QWERTY keyboards and you have to be careful not to hit 0 instead of O. Some l33t ppl actually prefer 0 to Os.

Denis Valeev
Yep... i missed the zero. Thanks
Brian
+4  A: 

If you copied that directly, your error is having a 0 (zero) instead of an O (the letter) on your [0rder]+6

md5sum
And notice the code colorization of stackoverflow made the color different, a big hint.
Emtucifor