Determine if a digital length is two words, if not, turn a number to two digits
If the value within the database is "9", the function is changed to "09" when reading.
The SQL code is as follows:
Create function fn_chg2 (@P varchar (2))
Returns varchar (2)
AS
Begin
IF LEN (@P) <2
Begin
Set @ p = '0' @p
end
Return @P
end