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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Nov 27, 2019, 11:49 PM
can you please try to below code,
Trick #1
Trick #2
let me know if you want to other help needed.
Thanks
Harsh GuptaPosted Nov 27, 2019, 5:22 AM
Otherwise, you can use the while loop as T-SQL doesn't have a
FORloop. You can refer below thread.