How to Use CASE WHEN in SQL Server
A support lead once asked me why her “high priority” ticket report showed refunds as low priority. The developer had written a long chain of IF logic in the application, and every time the rules changed, the app and the report disagreed. We moved the rule into one T-SQL expression, and the two numbers matched … Read more