select column from stored procedure or system call
Posted on 2011-03-16
There are certain stored procedures that I cannot see the inside of but I need to return only one column from the results. How do I do that?
I want to do something along the lines of "select age from sp_GetPersonalInfo"
I'm guessing it involves creating a temporary table, inserting it into there and selecting on that, but I don't know how to do that. I don't want to track this info, just query for it every periodically.
here's the concern though - I'll be querying a server for information that is returned by stored procedures in SQL and I'm concerned if each query recreates the same temp table what affect that will have.
for example xp_fixeddrives has the available space for each drive.
I will have 3 queries hitting the server at the same time, where one say "where drive letter is C" and the others say E and F. I'm guessing since this is happening at the same time I can't use the same temporary table name otherwise they may conflict with each other.
also, I need to drop the table at the end (or somehow erase the rows and re-insert) because I don't want the data to stay.