Hi there
I've an issue with a query over 2 tables.
Table 1 looks like:
Name: Basis
Attributes: KTR (Number), KST (Number), YTD (Number), HR (Number)
Table 2:
Name: Budget
Attributes: KTR (Number), PartnerID (Number), Jan(Number)
Example values for Table Basis:
KTR: 370050
KST: 333000, 334000, 335000, 336000
YTD: 10, 20, 30, 40
HR: 1000, 2000, 3000, 4000
Example values for Table Budget:
KTR: 370050, 370050, 370050
PartnerID: 333000, 334000, 336000
Jan: 100, 200, 300
So what I expect when I execute the query :-) it should look like:
KTR ID YTD HR SumBud-Jan
370050 333000 10 1000 100
370050 334000 20 2000 200
370050 335000 30 3000
370050 336000 40 4000 300
Below what I tried so far:
Unfortunately it doesn't work properly. When I try to execute the query I get 2 popup windows an he is asking for param-values B.JS and B.PartnerIDCode:SELECTBasis.KTR, Basis.KST, Basis.YTD, Basis.HR, IIF(B.JS IS Null, 0, B.JS) AS JanSumFROMBasis LEFT JOIN(SELECTSUM([Jan]) AS SJFROMBudgetGROUP BY [PartnerID]) AS BON Basis.KST = B.[PartnerID]
Your help is much apprechiated :-)
Regards