>>Hi Boris,
>>
>>Looks like IF ? in condition is ignored.
>>
>Maybe you have Case sensitive server?
No, I don't think so. Did you try running your script? I got
Msg 5058, Level 16, State 1, Line 10
Option 'RECOVERY' cannot be set in database 'tempdb'.
Msg 208, Level 16, State 1, Line 6
Invalid object name 'dbo.sysaltfiles'.
If it's not broken, fix it until it is.
My Blog