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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Access a returned table from within a stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-02 : 10:14:28
Michael Bellefroid writes "(SQLServer 2000 SP1/Windows 2000 SP2)

Let's take a stored procedure returning the first employee.

CREATE PROCEDURE [dbo].[GetFirstEmployee] AS
SELECT TOP 1 employee_name
FROM employees
ORDER BY employee_name
RETURN (0)
GO

How to access the returned result set from another stored procedure that calls the GetFirstEmployee ?

CREATE PROCEDURE [dbo].[Test] AS
EXECUTE [dbo].[GetFirstEmployee]

-- How to access the first employee name here ?
GO
"
   

- Advertisement -