I think this should win the “Most Horrible Sproc Parameters” contest if there were such a thing.
And then people wonder why I get mad when I see stuff like this. Just wow… Like I think you have to actually TRY to be this bad at development.
If you couldn't find your answer to your weird problem, you might find it here.