IF ELSE in SQL Server stored procedure - The TechTarget Expert Community - IT Knowledge Exchange

IF ELSE in SQL Server stored procedure - The TechTarget Expert Community - IT Knowledge Exchange

瀏覽:529
日期:2025-06-13
I am using this code which is giving error: if (@report_type = 'CM') Begin Select distinct Region,sum(ClientCount) as ClientTotal Into #NewTemp From ( End else if (@report_type = 'AM' ) Begin ( Select distinct Region,Area,sum(ClientCount) as ClientTotal I...看更多