February 14, 2005 at 7:47 am
I wish to Insert the results of sp_spaceused into a table. I can do this easily for the query running against a particular table, but when run as default (ie giving the whole Database size, Free space etc) it returns 2 resultsets, so am unable to archive the results into my table. Any ideas how I can get around this...?
February 15, 2005 at 9:13 am
put your result into a long text field. After you got the result, you will notice what the format look like. I try to look for how the row are incremented and what is in them. Replace all the space in your text with something that you could later replace with char(9) for tab. bcp out the result to a text file and then bcp it back into a formated table. Once you got each field seperately, you could do the actual insert statement into a real permanent table. It is a long painfull process you just got to be patient and learn the pattern of how you got your result.
mom
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply