SELECT DATENAME(MONTH, Date) AS MONTH, GatePassNo, Product_name, SerialNo, Customer_Name, Customer_Location, count( (CASE WHEN "Status" = 'Repaired by Vendor' THEN "Status" END)) as "Repaired", count( (CASE WHEN "Status" = 'Sent to Vendor for Repair' THEN "Status" END)) as "Pending", count( (CASE WHEN "Status" = 'Replaced with FSPL Inventory and Sent for Repair'or "Status" = 'Replaced with Onsite Inventory and Sent to Vendor'THEN "Status" END)) as "Replaced" FROM Product_Details WHERE Customer_Name in (@Customer_Name) and Customer_Location in (@Customer_Location) GROUP BY GatePassNo, Product_name, SerialNo, Customer_Name, Customer_Location, DATENAME(MONTH, Date)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)