I would like to display an Integer type field (Salary in this example) with a symbol suffix (%)
To do this I've cast it as a varchar, with the varchar size the maximum current length of the field (5)
However, what I would really like is to have the varchar size be programmatically the length of the field
SELECT
[salary]
,len(salary) LenSalary
,cast(salary as varchar(5))+'%' 'Salary+%'
--,cast(salary as varchar(len(salary)))+'%'
salary LenSalary Salary+%
10,000 5 10000%