I have a problem with a union query and counting. I have two queries that count different items from different stores. I want to see like items from each store and put the count of usage from each store into a single query. The problem is when I union these queries together, I have like items say:
Item Store 2100 Usage 2150 Usage
ABC 2100 0 10
ABC 2150 0 10
The item is used at both stores as identified by the store number. The usage will appear for store 2150 for each line the item appears in. I would like to have the union query remove the usage if the store number is not equal to the line the item is in:
Item Store 2100 Usage 2150 Usage
ABC 2100 0 0
ABC 2150 0 10
Is there a way to filter this out?
Thanks
Item Store 2100 Usage 2150 Usage
ABC 2100 0 10
ABC 2150 0 10
The item is used at both stores as identified by the store number. The usage will appear for store 2150 for each line the item appears in. I would like to have the union query remove the usage if the store number is not equal to the line the item is in:
Item Store 2100 Usage 2150 Usage
ABC 2100 0 0
ABC 2150 0 10
Is there a way to filter this out?
Thanks