Board index » SQL Server » Executing SP for all results
|
Gmansour
|
Executing SP for all results
SQL Server286
I would like to have my stored procedure executed for each item returned by a Select query Ex. Declare @file_id varchar(5) Select @file_id = file_id from GEN where this_value <>'' execute sp_mystored_procedure @file_id go Currently it only works for one record How do I get it to do it for all returned records? The top select statement may return 1000 records, but only one pass is made through the stored procedure Hints Please Thanks Darrell darrellp@btmcpa.com - |
