Reputation: 13
1.) I am getting an error for using SUM function in SQL is there a possible way to fix this, I tried searching the internet, but most of the examples are for single column.
SELECT
r.WorkOrderBatch,
wo.ProductCode,
wo.WorkOrderQty,
Convert(DATE,wo.StartDate),
wo.CurrentStatus,
Upvotes: 0
Views: 47
Reputation: 1399
replace this line:
SUM(COUNT(CASE r.IsTestPass WHEN 1 THEN NULL ELSE 1 END)) AS FailedQty
With
SUM(CASE r.IsTestPass WHEN 1 THEN 0 ELSE 1 END) AS FailedQty
rest everything looks good
Upvotes: 1