Hello Mr, I have more than 10 years working with SQL Server so I'm confident I can help you, but I need more information. I don't see the SP attached on this post. Can you send me the SP or add the code in the post, thanks a lot.
I Hope can help you.