E021-05, OCTET_LENGTH function


The specification states the following:

 Subclause 6.28, "<numeric value function>":
 <octet length expression> ::=
 OCTET_LENGTH <left paren> <string value expression> <right paren>

Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 vary as follows:

Transact-SQL does not support this feature. See the DATALENGTH function [MSDN-DATALENGTH] for equivalent functionality. Like OCTET_LENGTH, DATALENGTH counts trailing blank characters.