I've written a query in MS Access. This is a simplified version:
SELECT IIf([category] LIKE "*abc*","DEF",category) AS category
, Month
, Sum(qty) AS [qty]
FROM [tableX]
GROUP BY category, Month
The purpose of the query is to sum quantities of a product in different categories for different months. I want to aggregate categories like abc into a single category called ABC. When I view the query in Access the categories are correctly aggregated, but if I select from the query in C# code no aggregation is done.
Any ideas why this is this happening?