[SOLVED] Get all possible combinatios from the values from different tables

bzavala
New Altair Community Member
Hi! I need your help to solve the next problem:
I have a table with dates and a table with SKU´s
Table 1: Date-hour table
Att1 Att2
01/03/2013 0:00
02/03/2013 1:00
02/03/2013 3:00
Table 2: Sku´s table
Att1
1
2
I need to get all possible combinatios between that tables. I want to get
Att1 Att2 Att 3
01/03/2013 0:00 1
02/03/2013 1:00 1
02/03/2013 3:00 1
01/03/2013 0:00 2
02/03/2013 1:00 2
02/03/2013 3:00 2
How can I do that? Thanks you in advance.
I have a table with dates and a table with SKU´s
Table 1: Date-hour table
Att1 Att2
01/03/2013 0:00
02/03/2013 1:00
02/03/2013 3:00
Table 2: Sku´s table
Att1
1
2
I need to get all possible combinatios between that tables. I want to get
Att1 Att2 Att 3
01/03/2013 0:00 1
02/03/2013 1:00 1
02/03/2013 3:00 1
01/03/2013 0:00 2
02/03/2013 1:00 2
02/03/2013 3:00 2
How can I do that? Thanks you in advance.
Tagged:
0
Answers
-
Hi,
i think cartesian product is what you search for. But be careful with many attributes.
~Martin0 -
Many attributes is less of a problem (they are just added). Many examples is (their numbers are multiplicated).0
-
Thanks you very much0