I searched the MS-SQL Server 2005 database to make sure that the specific text field is always a multiple of 8. When I ran the following query, I realized that several lines are 30 in length. But when I examined these records, I found that they were longer.
select distinct len(cast(textfield as varchar)) from tablename
However, if I specify the varchar length as something longer (as in the following query), it works fine.
select distinct len(cast(textfield as varchar(1000))) from tablename
Does anyone know why it defaults to 30, and if it's a custom parameter?
Kevin source
share