I have a temporary table (or, say, a function which returns a table of values).
I want to execute some statements for each record in the table. Can this be done without using cursors?
I'm not opposed to cursors, but would like a more elegant syntax\way of doing it.
Something like this randomly made-up syntax:
for (select A,B from @temp) exec DoSomething A,B
I'm using Sql Server 2005.