DATALENGTH, LEN

Previous Next

DATALENGTH and LEN are native SQL functions on SQL Server.

DATALENGTH is not convertible for USoft. DATALENGTH( expression ) returns the number of bytes used to represent expression.

LEN is converted by USoft to LENGTH on other platforms than SQL Server. LEN( expression ) returns the number of characters of expression, excluding trailing blanks. LEN( expression ) is not supported on SQL Server for expressions of type TEXT or NTEXT. To get the length of such expressions, use DATALENGTH instead, bearing in mind that this returns the number of bytes instead of the number of characters, and that DATALENGTH is not convertible for USoft.

 

See also

SQL Functions