Quote:
Originally Posted by lauramc Hey jmh! What is the data type of the @statusCode? If it is not a char or varchar, you have to convert it so it will work in a dynamic procedure. Try CAST(@statuscode as varchar(10)) ... or whatever length you need if 10 is not enough. That should help  |
As stated above

, the data type is int. I also tried as you suggested before, but I get the following error:
Error 403: Invalid operator for data type. Operator equals add, type equals bit.
Wait...that's for the next line...God I feel stupid...All I had to do was the same thing on my second line and it worked
