createprocujo_bump_digit0@i_odigitVARCHAR(13),@resultVARCHAR(1)output,@did_rollintoutput as declare@new_valint, @orig_valint
set@did_roll=0 set@orig_val=ASCII(@i_odigit) IF@orig_val=57 begin /* go from '9' to 'a'*/ set@new_val=97 end elseIF@orig_val=117 begin /* go from 'u' to '0'*/ set@new_val=48 set@did_roll=1 end else begin set@new_val=@orig_val+1 end
set@result=CHAR(@new_val) GO GRANTEXECUTEON[dbo].[ujo_bump_digit0]TO[ujoadmin] GO