Hi,
That is a real good solution for calculating table space. However all these days i was using following script:
SET NOCOUNT ON
GO
IF OBJECT_ID('TEMPDB..#TMP_TBL_FOR_SPACEUSED') IS NOT NULL DROP TABLE #TMP_TBL_FOR_SPACEUSED
GO
CREATE TABLE #TMP_TBL_FOR_SPACEUSED...