lobotomix
New Member
hi! can someone help me? i have a list of orders with products, qty etc. i would like to find out if any order contains a list of products that fits to some criteria, and if it does to return true. for example here is the table:
and categories would be like this:
so, if any order contains all the products of one category, it should return TRUE:
or, it could simply return a category by order if exists.
thank you.
order no | product | catgory |
001 | A | 1 |
002 | B | 1 |
002 | C | 2 |
002 | D | 1 |
003 | A | 2 |
003 | D | 1 |
004 | B | 2 |
005 | C | 1 |
and categories would be like this:
product | category |
A | cat1 |
B | cat1 |
B | cat2 |
C | cat2 |
D | cat2 |
A | cat3 |
D | cat3 |
so, if any order contains all the products of one category, it should return TRUE:
order | TRUE/FALSE | category |
001 | FALSE | - |
002 | TRUE | cat2 |
003 | TRUE | cat3 |
004 | FALSE | - |
005 | FALSE | - |
or, it could simply return a category by order if exists.
thank you.