Can use this T-SQL coding

  • Hi Gurus,

    Can I use following T-SQL coding:

    If @Result<>0 Begin Set @Result=11 Goto Failure End

    instead of :

    If @Result<>0

    Begin

    Set @Result=11

    Goto Failure

    End

    I have compiled but there was no error

    Reason for doing this: use 1 line instead of 5 for only conditionaly setting variable's value

    Thanks

  • SQL

    does

    not

    depend

    on

    lines

    Flo

  • Thanks Flo

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply