declare @strout char(2), @strout2 char(2) select @strout = '31' select @strout2 = '10' select convert(integer,@strout) - convert(integer,@strout2)