truncated varchar

Database
Enthusiast

truncated varchar

Hello,
i was just wondering about a truncation of a varchar :
when inserting in a field in varchar(32000)format an extract of requesttext (for a very long view),
length of 12499 in dbc.tables, length of 18000 in dbc.tabletext), the shortest length is kept.
I had to enforce a char(32000) to get the full requesttext, but i don't know why ...

insert into Table1
select DBNAME,
TBNAME,
1,
TXT_V
from (select T1.databasename,T1.tablename,
case when T2.requesttext is not null then CAST(T2.requesttext as char(32000)) else CAST(T1.requesttext as char(32000)) end (char(32000)) VTXT
from DBC.TABLES T1 LEFT OUTER JOIN DBC.TABLETEXT T2
ON T1.databasename = T2.databasename and T1.tablename = T2.tablename
where T1.tablekind='V'and (T1.databasename,T1.tablename)
in (select ... from Table2)
) TMP (DBNAME, TBNAME, TXT_V)
;
Thanks for any comment about the right way to deal with varchar ...