I need a query to count the number of times a customer account number appears in a table and update a count total with the results, but to only count the records that have the OrderStatus as "Completed"
SELECT [CustomerAC], Sum(IIf([OrderStatusDevice] = "Completed", 1, 0)) As CountTotal
FROM Orders_Master
This is not working and i am getting...
Your query does not include the specified expression "CustomerAC" as part of an aggregate funtion.
SELECT [CustomerAC], Sum(IIf([OrderStatusDevice] = "Completed", 1, 0)) As CountTotal
FROM Orders_Master
This is not working and i am getting...
Your query does not include the specified expression "CustomerAC" as part of an aggregate funtion.