As an alternative to output params, the calling procedure USE INSERT ...
EXEC to insert the results into a table. For example:
CREATE PROCEDURE usp_ExecuteGetMyVals
AS
CREATE TABLE #GetMyVals(
Name1 varchar(3) NULL,
Name2 varchar(3) NULL,
Name3 varchar(3) NULL,
Name4 varchar(3) NULL,
Name5 varchar(3) NULL,
Name6 varchar(3) NULL)
INSERT INTO #GetMyVals EXEC GetMyVals
SELECT * FROM #GetMyVals
DROP TABLE #GetMyVals
RETURN 0
GO
--
Hope this helps.
-----------------------
SQL FAQ links (courtesy Neil Pike):
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq
-----------------------
> What's the best way of retrieving a number of parameters from a stored
proc
> Create Procedure GetMyVals
> AS
> --other processing
> RETURN 0
> If the above was called from another stored proc, how would I retrieve
> Name1-6 ? Is there an alternative to making them all OUTPUT params?
> Thanks
> David