Hi Chris,
like pointed out by Bill, use Cross Join.
In VFP SQL, a cross join is a join without any criteria.
Put the Product code in a table or cursor, do the same for Option 1 and Option
2 and Option ...
Then do the following query:
select ;
Product.Code, ;
Option_1.Option as Option_1, ;
Option_2.Option as Option_2 ;
from Product, Option_1, Option_2 ;
order by 1, 2, 3 ;
into cursor Combinations
HTH,
Gianni
On Wed, 18 Sep 2024 12:54:50 +0000, Chris Davis <[email protected]> wrote:
Before I start does anyone have any useful pointers in writing some code to
generate a list of all possible product combinations based on a matrix of
options
PRODUCT A
PRODUCT B
OPTION 1
Blue
x
x
Red
x
OPTION 2
Long
x
Short
x
x
A - Blue - Short
A - Long - Short
B - Blue - Long
B - Blue - Short
Obviously the actual matrix has a lot more options etc.
TIA
Chris.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.