Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 3 resident tables:
MARKETS
Market_ID
Market_Name
PRODUCTS
Product_ID
Product_Name
PERIODS
Period_ID
Period
I need to create a temparary table that would have records for each Market_ID, Product_ID, Period_ID. The output should looks like this...
Market_ID | Product_ID | Period_ID |
A1 | 1111 | 6 |
A1 | 1111 | 7 |
A1 | 1111 | 8 |
A1 | 2222 | 6 |
A1 | 2222 | 7 |
A1 | 2222 | 8 |
A1 | 3333 | 6 |
A1 | 3333 | 7 |
A1 | 3333 | 8 |
A2 | 1111 | 6 |
A2 | 1111 | 7 |
A2 | 1111 | 8 |
A2 | 2222 | 6 |
A2 | 2222 | 7 |
A2 | 2222 | 8 |
A2 | 3333 | 6 |
A2 | 3333 | 7 |
A2 | 3333 | 8 |
Is there an easy way to create this table without having to use 'for' loops? it is just too slow. I am wotking with about 500 Markets, 50000 Products and 36 Periods.
Any help would be appreciated.
Make a Cross Join
Make a Cross Join