Declare @Var1 Integer, @Var2 Numeric (9,3) Set @Var1 = 1 Set @Var2 = 2 RaisError('Var1 = %i Var2 = %i',16,1,@Var1, @Var2)
2000 returns Server: Msg 50000, Level 16, State 1, Line 4 Var1 = 1 Var2 = 2 2005 returns Msg 2786, Level 16, State 1, Line 4 The data type of substitution parameter 2 does not match the expected type of the format specification.The problem is @Var2 that is numeric(9,2) and is not integer. I think I have to replace the second %i. I tried to do something different, but no way.