﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / SQL 2000 query to populate temp table using EXEC sp_spaceused / 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>Wed, 22 May 2013 12:17:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL 2000 query to populate temp table using EXEC sp_spaceused</title><link>http://www.sqlservercentral.com/Forums/Topic1419653-8-1.aspx</link><description>This script provides a good example of what you are trying to do.Script is used to analyze table space usage using the output from the sp_spaceused stored procedureWorks with SQL 7.0, 2000, 2005, 2008, 2008 R2.  May work with 2012, but I havn't tested it there.Script to analyze table space usage[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61762[/url]</description><pubDate>Wed, 13 Feb 2013 11:29:41 GMT</pubDate><dc:creator>Michael Valentine Jones</dc:creator></item><item><title>SQL 2000 query to populate temp table using EXEC sp_spaceused</title><link>http://www.sqlservercentral.com/Forums/Topic1419653-8-1.aspx</link><description>Hi,I was wondering if you could help me.I was wondering how to populate the output of  SQL2000 sp_spaceused into a temp table (#t). But my flowing T-SQL query fails:CREATE TABLE #t (database_name VARCHAR(20), database_size VARCHAR(18), [unallocated space] VARCHAR(18),reserved VARCHAR(18),data VARCHAR(18), index_size VARCHAR(18), unused VARCHAR(18))select * from #t--EXEC sp_spaceused INSERT INTO #t (database_name, database_size, [unallocated space], reserved, data, index_size,unused) EXEC sp_spaceused --drop table #terror mgs on running I get:Server: Msg 213, Level 16, State 7, Procedure sp_spaceused, Line 148Insert Error: Column name or number of supplied values does not match table definition.Can anyone help?</description><pubDate>Wed, 13 Feb 2013 10:35:51 GMT</pubDate><dc:creator>melloman</dc:creator></item></channel></rss>