Sunday, May 21, 2006

New Transact SQL Video Tutorial: Design Pattern for Looping Through Rows and Executing A Stored Procedure - Using a Temporary Table

Design Pattern for Looping Through Rows and Executing A Stored Procedure - Using a Temporary Table - view details
Another great video in our Design Pattern series, this video tutorial focuses on how to iterate through a resultset and execute a stored procedure for each of the row values. Example: let's say you wanted to execute SP_HELPDB for every database on your server. You could write the code by hand by entering EXEC SP_HELPDB master; EXEC SP_HELPDB msdb; etc. The problem? This is not a dynamic approach so any new databases added after your script would not be included. The technique in the video uses temp tables for iteration.

To download this video, log in, then visit the video's detail page and click "download". This is a subscriber-only video so a subscription is required

Note: You must have the TSCC codec installed to view this video

0 Comments:

Post a Comment

<< Home