sql server - Can I: loop through sql select and then fire off for each loop? -


i'm missing (looking @ long), in stored procedure can select distinct values 1 table , each loop based on each of returned rows, build sql statements based on distinct values?

cheers.

yes, can use cursor.

note cursors best avoided if possible. if it's possible need set-based query -- , -- should instead.


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -