I want to select list of ids using select query and print one by one using for loop.
in for loop using id i want to insert that data in diffirant table.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Harsh GuptaRank #1,237 · 1.4K reputationPosted Nov 27, 2019, 12:22 AM EST
Otherwise, you can use the while loop as T-SQL doesn't have a
FORloop. You can refer below thread.Jaimin ShethiyaRank #177 · 13.7K reputationPosted Nov 27, 2019, 6:49 PM EST
can you please try to below code,
Trick #1
Trick #2
let me know if you want to other help needed.
Thanks