There is sometimes a need to figure out the maximum space that is being used by a particular column in your database. You would initially think that the LEN() function would allow you to do this, but this function does not work on Text, NText or Image data types, so how do you figure out the length of a value in a column that has one of these data types?
SELECT name, DATALENGTH(packagedata) FROM dbo.sysdtspackagesYou see things; and you say 'Why?' But I dream things that never were; and I say 'Why not?'
Monday, February 9, 2009
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2009
(33)
-
▼
February
(8)
- Stored procedure which were created in last 7days
- To get the row count in a faster way
- Unmatching records between two tables
- Exporting the output into a text or csv file
- Taking a backup or creating a duplicate table
- Doing a bulk insert of a text file in temp table
- Getting a SQL Server RowCount Without doing a Tabl...
- How to get length of data in Text, NText and Image...
-
▼
February
(8)
No comments:
Post a Comment