A
At work
I'm trying to get a list of contacts based on if they ordered a certain
product. I feel like the numbers returned should be a lot bigger then what
I'm getting...also, I'm getting mixed results.
Here's what I have.
contact table >OrderTable (has total amount of order and shipping
address)>Order Details (list of products ordered and qty's)
these are one to many relations. I also have my inventory table which has no
relations or constraints directly to any table.
Here's what I first tried:
contact table >OrderTable >Order Details + inventory
I linked the inventoryid from order details to the inventory table. I have 4
products I'm looking for and in the criteria of the inventory id I put "715"
or "716" or "1688" or "1689"
This returned 144 records (with some dupes, since a customer could have
ordered the same items more then once so that's fine).
However, if I only search for just one of the products it returned 265
results (again with some dupes).
I guess I need some time of and or in my criteria or is it something else
I'm doing wrong/the combination of how my tables are linked.. I did try and
or, but it said invalid syntax.
Mainly, just want a list of customers who've ordered these products.
Ultimately, although not necessary (would be helpful), it'd be nice to run a
total of all the orders placed by that customer, not the total$ but all
their orders of that one or many products to get a total of how many of each
(or how many combined of all products) they've ordered.
Thanks
product. I feel like the numbers returned should be a lot bigger then what
I'm getting...also, I'm getting mixed results.
Here's what I have.
contact table >OrderTable (has total amount of order and shipping
address)>Order Details (list of products ordered and qty's)
these are one to many relations. I also have my inventory table which has no
relations or constraints directly to any table.
Here's what I first tried:
contact table >OrderTable >Order Details + inventory
I linked the inventoryid from order details to the inventory table. I have 4
products I'm looking for and in the criteria of the inventory id I put "715"
or "716" or "1688" or "1689"
This returned 144 records (with some dupes, since a customer could have
ordered the same items more then once so that's fine).
However, if I only search for just one of the products it returned 265
results (again with some dupes).
I guess I need some time of and or in my criteria or is it something else
I'm doing wrong/the combination of how my tables are linked.. I did try and
or, but it said invalid syntax.
Mainly, just want a list of customers who've ordered these products.
Ultimately, although not necessary (would be helpful), it'd be nice to run a
total of all the orders placed by that customer, not the total$ but all
their orders of that one or many products to get a total of how many of each
(or how many combined of all products) they've ordered.
Thanks