Paramater with a Conditional

  • What the devil Is wrong with this?????  Am I crazy today???

     

    Declare @ACTION char (3)

    Declare @IsNewHire bit

    Set @ACTION = 'HIR'

    Set @IsNewHire =

      IF

      @ACTION <> 'HIR'

      BEGIN

      SET @IsNewHire = 0

      END


    -Isaiah

  • Declare @ACTION char (3)

    Declare @IsNewHire bit

    Set @ACTION = 'HIR'

      IF @ACTION <> 'HIR'

    Begin

      SET @IsNewHire = 0

      END

     

     

    mom

  • Way cool, I knew I was just crazy!


    -Isaiah

  • Isaiah,  it seems like you wanted to do this...

    Declare @ACTION char (3)

    Declare @IsNewHire bit

    Set @ACTION = 'HIR'

    Set @IsNewHire =

      CASE WHEN @ACTION <> 'HIR' THEN 0

      ELSE 1

      END

    Nicolas Donadio

    Sr. Sotware Developer

    DPS Automation

    ARGENTINA

     

     

  • Yes, Thank You!


    -Isaiah

Viewing 5 posts - 1 through 4 (of 4 total)

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