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 |
|
tocroi72
Yak Posting Veteran
89 Posts |
Posted - 2006-04-19 : 15:35:12
|
| hi,sp_spaceused return 2 set of results. How do i store this result into a table? Thanks |
|
|
druer
Constraint Violating Yak Guru
314 Posts |
Posted - 2006-04-19 : 15:42:44
|
| Create table SpaceUsed (field datatype ....)insert into SpaceUsedexec (sp_spaceused ...)Should do it. |
 |
|
|
tocroi72
Yak Posting Veteran
89 Posts |
Posted - 2006-04-19 : 15:46:31
|
| if a sp returns only one set of result , then i can do that , but sp_spaceused return 2 sets of result , i tried as below:drop table #tcreate table #t (database_name varchar (50),database_size varchar(100),[unallocated space] varchar(100),reserved varchar(10),data varchar(10),index_size varchar(10),Unused varchar(10))insert into #texec sp_spaceused and the error message i got is: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.Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
|
|
tocroi72
Yak Posting Veteran
89 Posts |
Posted - 2006-04-20 : 11:01:55
|
| Thank you for all of yours suggestion. They are very helpful. |
 |
|
|
|
|
|
|
|