Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2009-08-25 : 01:41:44
|
| I would like to copy the contents/results of running 'exec sp_spaceused' into a table, does anyone know how to do this please? |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-08-25 : 01:49:00
|
| declare @tab table(id int, name varchar(64),active bit)insert into @tab exec usp_spname value1,value2select * from @tabif any input values pass it in value1,value2......... |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-08-25 : 01:52:07
|
| declare @mytable table (objname varchar(100),rows varchar (10), reserved varchar(10),data varchar(10),index_size varchar(10), unused varchar(10))insert into @mytableexec sp_spaceused '<tablename>'select * from @mytableSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2009-08-25 : 02:03:27
|
| Thanks for that,how would i get this to return the size of the tempdb? |
 |
|
|
|
|
|