execute procedure for a sequence of elements (execute theProc (select id from table))

Posted by Omu on Stack Overflow See other posts from Stack Overflow or by Omu
Published on 2010-05-19T08:51:14Z Indexed on 2010/05/19 9:10 UTC
Read the original article Hit count: 348

Filed under:
|

I need to execute the procedure deleteQuestion for each element that was returned by this select query:

select id from questions where Stuff = @Stuff

execute deleteQuestion id

something like:
execute deleteQuestion each(select id fom questions where Stuff = @Stuff)

anybody knows how ?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server