79394500

Date: 2025-01-28 16:20:47
Score: 2.5
Natty:
Report link

While OPTION(RECOMPILE) would probably solve your issue, I would suggest reading this article: https://www.sqlinthewild.co.za/index.php/2009/09/15/multiple-execution-paths/ which explains why if/else blocks in a stored procedure can mess with your query execution, and how you can fix it.

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: mikkel