I have created a new stored procedure which generates a new report in our TEST environment which is on CSI Version 2024.08.01.4 . I have copied the stored procedure and recreated report and background task in our LIVE environment which is on CSI Version 2023.08.02.8. Strangely, the report works perfectly in the TEST environment but it won't run from our LIVE environment. When I test the stored procedure directly from the database it executes as expected. I can see in the background task history that the exact same parameter and formatting is used so I am at a loss to figure out what the problem is. I get the error: Incorrect syntax near the keyword 'FROM'.::3 but I have confirmed that there is no syntax error as the stored procedure is executing from the database.