I am writing a SQL Function that will take in a decimal and return the base32 representation of that decimal.
My problem is with the decimal to ascii conversion.
I am allowed to run the following query and return an ascii character
"SELECT CHAR( 65 )" which returns "A"
However in my function when I am trying to build my output string of letters, I am having trouble casting a bigint into a char, then concatenate that char to the end of a another char(which would be my output).
Sample line of code: "SET @OutputChar = @OutputChar + CAST( ( @Output + 55 ) AS CHAR(255) )"
What is the proper way to cast a bigint to char and then concatenate that char to another?
Thanks