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
 Transact-SQL (2000)
 Stored Procedure Recordset Values

Author  Topic 

iminore
Posting Yak Master

141 Posts

Posted - 2004-12-21 : 10:56:18
Where a stored procedure returns a single record recordset is it possible to get the values without creating a temporary table?
So if
exec SP @var = @varvalue
returns a single record recordset is it possible to get the values without inserting them into a temporary table and then reading that table.

X002548
Not Just a Number

15586 Posts

Posted - 2004-12-21 : 11:02:35
Do you mean like


USE Northwind
GO

DECLARE @OrderId int
SELECT @OrderId = MAX(OrderId) FROM Orders
SELECT @OrderId
GO




Brett

8-)
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2004-12-21 : 11:24:26
no Brett not like that
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-12-21 : 12:02:44
Have you tried using output parameters?

- Jeff
Go to Top of Page

Hippi
Yak Posting Veteran

63 Posts

Posted - 2004-12-21 : 13:20:44
Or maybe you want to create an UDF that return a recordset and put that function in to the sp?
Go to Top of Page
   

- Advertisement -