I have two huge crosstab tables that I need to extract data from.

First crosstab has a list of planogram names as horizontal axis, and store # as vertical axis. Data is merely "X" values, to indicate which store uses which planogram.

Second crosstab has the same list of planograms as horizontal axis, but SKU numbers in the vertical axis. Data indicates the amount of facings each product has in the planograms.


What I need as an end result is a relational database where I can know: what store carries what SKU, and how many facings.

One thing making this a huge headache is the size of these tables: I have 1279 planograms, 924 stores, 872 skus.
The other thing is one store carries about 40 planograms. But 1 sku will only be present in one planogram in that store.

Hope this is clear enough.

Including screenshots to make this clearer. (Dummy Data)

end-result.png
Please Advise??

Thanks