Hi,
I have table #1 "Items" with "Item No" as the Primary Key.
I also have linked table #2 "Item Variants" with foreign Key "Item Number" and Primary Key "Variant Code" (alpha-numeric).
Each Item nay have multiple Variants, but only one combination of Item/Variant Code per the Item Variant Table.
I have three Items A, B, and C.
Each Item has multiple Variants.
Item A Variants = "Red, White, Blue"
Item B Variants = "Red, Blue, Black, Yellow, White"
Item C Variants = " Red White, Blue, Purple"
I would like to select a distinct list of all Variants from the Variant Table where Common Variants exist (i.e. Red, White, and Blue).
For example I want to create a list for a drop-down box that has only the COMMON Variants of the three Items.
I would like to do this using just one SQL statement without having to do loops, etc.
Any ideas?
All input appreciated.
Thanks for reading.
Dave
I have table #1 "Items" with "Item No" as the Primary Key.
I also have linked table #2 "Item Variants" with foreign Key "Item Number" and Primary Key "Variant Code" (alpha-numeric).
Each Item nay have multiple Variants, but only one combination of Item/Variant Code per the Item Variant Table.
I have three Items A, B, and C.
Each Item has multiple Variants.
Item A Variants = "Red, White, Blue"
Item B Variants = "Red, Blue, Black, Yellow, White"
Item C Variants = " Red White, Blue, Purple"
I would like to select a distinct list of all Variants from the Variant Table where Common Variants exist (i.e. Red, White, and Blue).
For example I want to create a list for a drop-down box that has only the COMMON Variants of the three Items.
I would like to do this using just one SQL statement without having to do loops, etc.
Any ideas?
All input appreciated.
Thanks for reading.
Dave