I wrote a SQL function (my first) that returns a string (which can vary in length). If I declare the function like this...
ALTER Function getVteResolvedStatus (@VTE_ID INT) Returns varchar (30) AS
I always seem to get 30 characters back. If the string is only 20 characters I only want 20. I tried using RTRIM but that did not seem to work. Is there something I can do to make the return string truncate spaces?
ALTER Function getVteResolvedStatus (@VTE_ID INT) Returns varchar (30) AS
I always seem to get 30 characters back. If the string is only 20 characters I only want 20. I tried using RTRIM but that did not seem to work. Is there something I can do to make the return string truncate spaces?