Is there a simpler/cleaner way to do this using SQL Server 2000?
Every few days I need to do this.
I first look at how many records we have total:
SELECT COUNT(*) FROM MyTable
Then I list all the lengths of a certain field:
SELECT LEN(MyText)
FROM MyTable
ORDER BY LEN(MyText) ASC
I then need to scroll down 1/3rd of the way... and note the value. I then need to scroll down 2/3rds of the way... and note the value. And then finally the last value.
I need to find out x, y, and z:
33% of the records have this field with a length under x bytes
66% of the records have this field with a length under y bytes
100% of the records have this field with a length under z bytes