Hello @SwapnilKalkar-4467 ,
Thanks for your patiance here .
On checking duplicate part of the question , i think you are refering to the use case where you do not want to have duplicate records on the table , if that the ase you can use WHERE NOT EXISTS ().
Since in your case you are using the SP , i think you can put the dedup logic in the SP itself .
Let me know if you have any further questions .
Thanks & stay safe
Himanshu
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members