UltraSmooth
Programmer
I have a promotion table that contains items that are on sale for a certain promotion. A promotion item can be setup based on the following criteria:
Item#, Dept, Class, Supplier, Product_Line,Category_1,Category_2,Category_3.
A promotion item can be entered by filling in any of the criteria above. For instance, items can be included in a promotion by entering just the Item#, or can be included by just specifying the Dept,Supplier,Product_Line,Dept & Class, etc. and all items that match on those details will be included in the promotion.
I need to make a join by Item# to a sales table to generate a sales summary for a promotion.
In order to first get a list of all item#'s that are in a promotion I need to do a look up in the item_detail table to determine the item# for items that are included but were not associated directly by item# but by their details such as Dept,Class, Supplier...
The problem is the number of variations (since an item can be assoiated by dept,dept & class,supplier,vendor ....)
How would I go about writing a query to generate this complete item# list? I really don't know how to tackle this properly. I hope my description is clear enough.
Thank you for any help.
Item#, Dept, Class, Supplier, Product_Line,Category_1,Category_2,Category_3.
A promotion item can be entered by filling in any of the criteria above. For instance, items can be included in a promotion by entering just the Item#, or can be included by just specifying the Dept,Supplier,Product_Line,Dept & Class, etc. and all items that match on those details will be included in the promotion.
I need to make a join by Item# to a sales table to generate a sales summary for a promotion.
In order to first get a list of all item#'s that are in a promotion I need to do a look up in the item_detail table to determine the item# for items that are included but were not associated directly by item# but by their details such as Dept,Class, Supplier...
The problem is the number of variations (since an item can be assoiated by dept,dept & class,supplier,vendor ....)
How would I go about writing a query to generate this complete item# list? I really don't know how to tackle this properly. I hope my description is clear enough.
Thank you for any help.