﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss content posted by Eric Wahner / Article Discussions / Article Discussions by Author  / Space Used By Table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 12:03:36 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Space Used By Table</title><link>http://www.sqlservercentral.com/Forums/Topic659976-465-1.aspx</link><description>Another way to do it. . .[code]CREATE TABLE #temp        (        [name] nvarchar(128),       [rows] char(11),       [reserved] varchar(18),        [data] varchar(18),        [index_size] varchar(18),        [unused] varchar(18)        ) INSERT INTO #temp EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?' "SELECT       [name] AS TableName,       CAST([rows] AS int) AS NumOfRows,       CAST(REPLACE([reserved],' KB','') AS int) AS [TotalKB]FROM        #tempORDER BY 3 DESCSELECT SUM(CAST(REPLACE([reserved],' KB','') AS int)) AS TotalKB_data FROM #tempDROP TABLE #temp[/code]</description><pubDate>Wed, 04 Mar 2009 05:37:36 GMT</pubDate><dc:creator>WILLIAM MITCHELL</dc:creator></item><item><title>Space Used By Table</title><link>http://www.sqlservercentral.com/Forums/Topic659976-465-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/sp_spaceused/65923/"&gt;Space Used By Table&lt;/A&gt;[/B]</description><pubDate>Wed, 18 Feb 2009 17:23:56 GMT</pubDate><dc:creator>Eric Wahner-345205</dc:creator></item></channel></rss>