title: How to increment a user variable in on success and on failure execute sql task in BIDS?
body: <p>I have a simple package in which I'm executing select statement in Execute SQL Task, I want on success of this task my variable @cnt=0 should increase @cnt by one like @cnt=@cnt+1 and in script task i should be able to show it and on failure it should be like @cnt=@cnt-1.</p>
  
  <p>What should I try in precedence constraint, I tried  using this '@CNT==@CNT+1' but it does not increase the value of @cnt on success.</p>
  
  <p>my Expression is
  <a href="https://i.stack.imgur.com/mlAiU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mlAiU.png" alt="my Expression is "></a></p>
  
  <p>Appreciate any help on this.</p>