InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Upgrading SQL Server - xp_execresultset

Posted by Jonathan Allen on Oct 21, 2006

Sections
Operations & Infrastructure,
Architecture & Design,
Development
Topics
SQL Server 2005 ,
SQL Server ,
Relational Databases ,
.NET ,
Data Access ,
Microsoft ,
SQL Server 2000 ,
Programming ,
Database ,
Companies

SQL Server 2000 had a useful, though undocumented, function called xp_execresultset. This function takes a query that creates a set of intermediate queries. These intermediate queries are then executed. This function is especially useful when you need to execute a stored procedure against multiple rows. Unfortunately for those already using it, SQL Server 2005 has dropped this feature.

Adam Machanic has come to the rescue with ExecResultSet. This handy little proc duplicates the functionality of xp_execresultset.

 

No comments

Watch Thread Reply