I have 3 tables
One with maindata, and has the following coloumns:
StoreID, SKUID, Revenue and period
Then I have create two tables with detailed information for each store and for each SKU
The Storetable has these coloumns:
StoreID, Storename, Chain-sub, Chain
StoreID in my Storetable match StoreID in my maindata-table. So they should combine with each other so that I can draw storename, chain-sub and Chain into my query.
The SKU-table has these coloumns:
SKUID, SKU-name, Own-category
SKUID in the SKU-table match SKUID in the maintable. That way I seek to sort each SKU according to our internal Categories.
I'm only testing and currently my maindata-table has 71884 rows, and now things get strange. When I create a query and create relations between my maindata-table and the two other tables I get 73906 rows. That doesn't look right to me and what is wrong?
Here is the query I create:
SELECT Butiksliste.Kæde, Butiksliste.[Kæde-sub], Butiksliste.Butiksnavn, [CP Kategorisering].[CP Kategori], Data.[Oms (kr)]
FROM (Butiksliste INNER JOIN Data ON Butiksliste.Butiksnr = Data.Butik) INNER JOIN [CP Kategorisering] ON Data.Vare = [CP Kategorisering].Vare;
Below I have translated it into the explaination above:
SELECT Storetable.chain, Storetable.[Chain-sub], Storetable.Storename, [SKU-table].[Own Category], Maindata.[Revenue]
FROM (Storetable INNER JOIN Maindata ON Storetable.StoreID = Maindata.StoreID) INNER JOIN [SKU-table] ON Maindata.SKUID = [SKU-table].SKUID;
Hope You can help
In advance tx
One with maindata, and has the following coloumns:
StoreID, SKUID, Revenue and period
Then I have create two tables with detailed information for each store and for each SKU
The Storetable has these coloumns:
StoreID, Storename, Chain-sub, Chain
StoreID in my Storetable match StoreID in my maindata-table. So they should combine with each other so that I can draw storename, chain-sub and Chain into my query.
The SKU-table has these coloumns:
SKUID, SKU-name, Own-category
SKUID in the SKU-table match SKUID in the maintable. That way I seek to sort each SKU according to our internal Categories.
I'm only testing and currently my maindata-table has 71884 rows, and now things get strange. When I create a query and create relations between my maindata-table and the two other tables I get 73906 rows. That doesn't look right to me and what is wrong?
Here is the query I create:
SELECT Butiksliste.Kæde, Butiksliste.[Kæde-sub], Butiksliste.Butiksnavn, [CP Kategorisering].[CP Kategori], Data.[Oms (kr)]
FROM (Butiksliste INNER JOIN Data ON Butiksliste.Butiksnr = Data.Butik) INNER JOIN [CP Kategorisering] ON Data.Vare = [CP Kategorisering].Vare;
Below I have translated it into the explaination above:
SELECT Storetable.chain, Storetable.[Chain-sub], Storetable.Storename, [SKU-table].[Own Category], Maindata.[Revenue]
FROM (Storetable INNER JOIN Maindata ON Storetable.StoreID = Maindata.StoreID) INNER JOIN [SKU-table] ON Maindata.SKUID = [SKU-table].SKUID;
Hope You can help
In advance tx