I've done things like that... the rush of "omg, wtf did I just do?". I've had co-wokers come to me and say "ya, I did update tblTable set field = 1, then accidently hit the execute button". I write my update/delete statements "update tblTable where 1 = 2" and then do the rest. It has saved my ass so many times
.
Then I have done things like:
Code:
AND SystemGenerated = CASE WHEN @SystemGenerated = 1 THEN 1 ELSE 0 END,
It works, but its totally unnessessary. I'm sure I had something else in mind, but ya, this would have worked just fine:
Code:
AND SystemGenerated = @SystemGenerated