projectionlabs.net feedSubscribe via RSS what is this?

length of ntext in sql server

In SQL Server, if you try len(FieldName) to return the number of characters in a field and the field is a type of Text or nText, you get an error:

Argument data type text is invalid for argument 1 of len function

The answer to this is the Datalength() function which will return the length of any expression. This can be used on all data types including text, ntext, image and varbinary.

It returns the actual number of bytes in the field.

2 Comments so far

  1. ingiltere dil okulu September 15th, 2008 7:00 am

    doesn’t this web site has other languages support??

  2. Onisii November 5th, 2008 11:12 pm

    Thank you very much for infu. The author RESPECT and uvazhuha.

Leave a reply