Just ran into another from issue, when casting SMALLINT to varchar(2) why in the world does it add 5 leading spaces and force me to do a trim before concatinating the result of the cast?
Example:
new_month as smallint = 7
sel '0' || cast(new_month as varchar(2))
returns '0 7'
but triming...
sel '0' || trim(cast(new_month as varchar(2)))
returns correctly '07'
we can now use this month to cast a concatenated string to a date.
↧