Is there an easier / cleaner way to do this with SQL Server 2000?
Every few days I need to do this.
First, I'll see how many records we have:
SELECT COUNT(*) FROM MyTable
Then I list all the lengths of a certain field:
SELECT LEN(MyText)
FROM MyTable
ORDER BY LEN(MyText) ASC
Then I need to scroll down 1/3 of the way ... and mark the value. Then I need to scroll down 2 / 3rds of the path ... and mark the value. And finally, the last meaning.
I need to know 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
source
share