natigsqlserver - Saturday, December 30, 2017 8:57 AM
Yes, I know you do; as i said before, are you happy to have these separately? Do you understand what the above is doing, and why it's safer?
The most important thing you need to learn from this post is the danger of SQL injection. I may well solve the problem you intially came here for later, however, what you need to learn is how bad the current SP you have is. You need to be able to come away from this topic knowing to never create a stored procedure like that, and to know how you should do it instead in the future as well.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk