I wrote this to calculate the median on a record set. All you need to pass is the table name and column name. If you would like to filter the record set, create a view that displays the correct record.
The limitation of not being able to pass arrays to Stored procedure or functions was the primary reason for creating it in this way.
Script to get total rows and space used
Script to Get Total Rows, space used and reserved (KB) of all tables
2006-08-18 (first published: 2006-08-01)
1,087 reads