How to get the length of the image, text, ntext data type
Posted on 2/28/2007 5:00:12 AM
in #SQL SERVER
Hi
Many a times we want to find the amount of space a particular database column is talking. We have the Len function in the SQL to get the length of a particular column data.
But the problem with this unction is that it does not work on the ntext, text or the image data type.
So when you have to find the length of a text, ntext or image data type use DATALENGTH function. This function can be used on all data types.
This is another of those functions that is not used daily but can be very helpful at difficult times.
Hope this helps Thanks Vikram
|