Home Forums SQL Server 7,2000 T-SQL Assign a variable value based on conditions RE: Assign a variable value based on conditions

  • As a check to see whether you are in the if statements you could put in print statements in the different if conditions to see whether the code actually enters the if statements.

    Also, are you declaring @percent as decimal or int? If it is int (or tinyint etc) you will get 0.

    Jeremy