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
Post a Comment