Thing here depends on number you are going to give
See the examples below
Example 1:
DECLARE @List Int
SET @List = 11115
SELECT @List as list, CAST(@List AS varchar(5)) as caststring,CONVERT(varchar(5), @List) as convertstring
SELECT len(@List) as directlen,LEN(CAST(@List AS varchar(5))) as cst,LEN(CONVERT(varchar(5), @List)) as conv
Result
list caststring convertstring
11115 11115 11115
directlen cst conv
5 5 5
Example 2:
DECLARE @List Int
SET @List = 111115
SELECT @List as list, CAST(@List AS varchar(5)) as caststring,CONVERT(varchar(5), @List) as convertstring
SELECT len(@List) as directlen,LEN(CAST(@List AS varchar(5))) as cst,LEN(CONVERT(varchar(5), @List)) as conv
Result
list caststring convertstring
11115 11115 11115
directlen cst conv
5 5 5
Two examples shows, if you are declaring convert() or cast() with varchar it will show upto data lenth declare only. If int has one character more than declare data limit they will not show it. If you your variable has certain limit you can go with convert().
Len() function it self convert as string measures the length of the integer variable.
Even you want to handle it see below example
DECLARE @List Int
SET @List = 1111115
SELECT @List as list, CAST(@List AS varchar) as caststring,CONVERT(varchar, @List) as convertstring
SELECT len(@List) as directlen,LEN(CAST(@List AS varchar)) as cst,LEN(CONVERT(varchar, @List)) as conv
Result
list caststring convertstring
1111115 1111115 1111115
directlen cst conv
7 7 7