I have this long stored procedure that worked before I changed something.
All I want to do is amend the UNION ALL section.
Right around line 150 there is a comment that says PROBLEM WITH THIS PART
My goal is to UNION ALL, but use a CASE for a second part of the UNION ALL.
I am receiving syntax errors. Can someone please help me find where my syntax error is. I also shorted the Case details just to find my syntax error.