Ik ben relatief nieuw in access en in SQL, bij het maken van een query "QQQ" krijg ik de volgende fout:
"The specified field '[Q3 All Children of Parent 1 Column].[Child]' could refer to more than one table listed in the FROM clause of your SQL statement."
Hopelijk kan iemand me hier helpen om mijn query "QQQ", of één van de queries waar query "QQQ" naar verwijst zo aan te passen dat het wel functioneert? Zoja, dan ben ik je eeuwig dankbaar
. De SQL van query QQQ ziet er als volgt uit:
SELECT [Q3 All Children of Parent 1 Column].Parent, [Q3 All Children of Parent 1 Column].CMC.Child, [Q8 MatState Excluder].Child
FROM [Q3 All Children of Parent 1 Column] INNER JOIN [Q8 MatState Excluder] ON [Q3 All Children of Parent 1 Column].CMC.Child = [Q8 MatState Excluder].Child;
Deze query koppels weer 2 andere queries aan elkaar, namelijk queries "Q3 All Children of Parent 1 Column" en "Q8 MatState Excluder". Deze queries staan hier onder beide weergegeven. Beide queries geven het gewenste resultaat, zonder foutmeldingen.
De SQL van query "Q3 All Children of Parent 1 Column" ziet er als volgt uit:
SELECT [Parent], [CMC.Child] From [Q2 All Children of Parent] WHERE [CMC.Child] is not null
UNION SELECT [Parent], [CMC_1.Child] From [Q2 All Children of Parent] WHERE [CMC_1.Child] is not null
UNION SELECT [Parent], [CMC_2.Child] From [Q2 All Children of Parent] WHERE [CMC_2.Child] is not null
UNION SELECT [Parent], [CMC_3.Child] From [Q2 All Children of Parent] WHERE [CMC_3.Child] is not null
UNION SELECT [Parent], [CMC_4.Child] From [Q2 All Children of Parent] WHERE [CMC_4.Child] is not null;
De SQL van Query "Q8 MatState Excluder" ziet er als volgt uit:
SELECT DISTINCT [Q7 Input-bouwgroep Excluder].Parent, MARC.MS AS [MS Parent], [Q7 Input-bouwgroep Excluder].Child
FROM ([Q7 Input-bouwgroep Excluder] INNER JOIN [Q CMC incl materialNrs] ON [Q7 Input-bouwgroep Excluder].Parent=[Q CMC incl materialNrs].Parent) INNER JOIN MARC ON [Q CMC incl materialNrs].ParentMaterial=MARC.Material
WHERE (((MARC.MS)<>"50"));
Wie mij helpt is mijn held!:d
"The specified field '[Q3 All Children of Parent 1 Column].[Child]' could refer to more than one table listed in the FROM clause of your SQL statement."
Hopelijk kan iemand me hier helpen om mijn query "QQQ", of één van de queries waar query "QQQ" naar verwijst zo aan te passen dat het wel functioneert? Zoja, dan ben ik je eeuwig dankbaar

SELECT [Q3 All Children of Parent 1 Column].Parent, [Q3 All Children of Parent 1 Column].CMC.Child, [Q8 MatState Excluder].Child
FROM [Q3 All Children of Parent 1 Column] INNER JOIN [Q8 MatState Excluder] ON [Q3 All Children of Parent 1 Column].CMC.Child = [Q8 MatState Excluder].Child;
Deze query koppels weer 2 andere queries aan elkaar, namelijk queries "Q3 All Children of Parent 1 Column" en "Q8 MatState Excluder". Deze queries staan hier onder beide weergegeven. Beide queries geven het gewenste resultaat, zonder foutmeldingen.
De SQL van query "Q3 All Children of Parent 1 Column" ziet er als volgt uit:
SELECT [Parent], [CMC.Child] From [Q2 All Children of Parent] WHERE [CMC.Child] is not null
UNION SELECT [Parent], [CMC_1.Child] From [Q2 All Children of Parent] WHERE [CMC_1.Child] is not null
UNION SELECT [Parent], [CMC_2.Child] From [Q2 All Children of Parent] WHERE [CMC_2.Child] is not null
UNION SELECT [Parent], [CMC_3.Child] From [Q2 All Children of Parent] WHERE [CMC_3.Child] is not null
UNION SELECT [Parent], [CMC_4.Child] From [Q2 All Children of Parent] WHERE [CMC_4.Child] is not null;
De SQL van Query "Q8 MatState Excluder" ziet er als volgt uit:
SELECT DISTINCT [Q7 Input-bouwgroep Excluder].Parent, MARC.MS AS [MS Parent], [Q7 Input-bouwgroep Excluder].Child
FROM ([Q7 Input-bouwgroep Excluder] INNER JOIN [Q CMC incl materialNrs] ON [Q7 Input-bouwgroep Excluder].Parent=[Q CMC incl materialNrs].Parent) INNER JOIN MARC ON [Q CMC incl materialNrs].ParentMaterial=MARC.Material
WHERE (((MARC.MS)<>"50"));
Wie mij helpt is mijn held!:d