I want to insert into two tables from one table based on vlaue on sourcestring value as per type, like if 'protection' then in protection table else in 'configuration' table

I want to insert into two tables from one table based on vlaue on sourcestring value as per type, like if 'protection' then in protection table else in 'configuration' 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.
Srinivasan RamamoorthiPosted Oct 22, 2021, 2:31 AM
You can write a stored procedure with cursor and if condition. I won’t recommend doing this with query. Later you can enhance the procedure to add more logic or include transaction support and exception handling.
Siddhant pandaPosted Oct 25, 2021, 5:24 AM
Sachin SinghPosted Oct 22, 2021, 5:19 AM
Jignesh KumarPosted Oct 22, 2021, 4:52 AM