April 25, 2018 at 11:08 pm
Hi I am novice in SQL development and want help on writing a procedure. My requirement is first I will get some data through a query and then for each record from the result need to run another query. Now for each record from that result set have to run a procedure. I am using CTE to get the result in first case but unable to proceed further.
Please help me in writing the logic. Thanks for your help.
April 26, 2018 at 1:03 am
Hi,
please post your t-sql code you create until now.
And show us the create script of the tables you use.
With this kind of discription, no one could help you.
Best regards,
Andreas
April 26, 2018 at 9:53 am
KGNH - Wednesday, April 25, 2018 11:08 PMHi I am novice in SQL development and want help on writing a procedure. My requirement is first I will get some data through a query and then for each record from the result need to run another query. Now for each record from that result set have to run a procedure. I am using CTE to get the result in first case but unable to proceed further.
Please help me in writing the logic. Thanks for your help.
To complete that process, you need to learn dynamic sql. That's something that I would advice a novice to do as it can be dangerous. Dynamic SQL is basically like a scalpel, it can be great in the right hands but it can kill someone in the wrong ones.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply