I have a Union All query that I currently run a make table query from. I am trying to consolidate them into one thing and have the union all query also just make the table. I am learning on the fly here any have been trying the INTO method which I can get to work as just a make table but as soon as I add the UNION ALL I get the syntax error.
Any help on what I am doing wrong would be greatly appreciated.
SELECT *
INTO tbl_Test
FROM
(SELECT
qry_BomLevel1_PartNo.Type, qry_BomLevel1_PartNo.PartNo,
qry_BomLevel1_Desc.Description, qry_BomLevel1_Rev.Revision,
qry_BomLevel1_PartNo.Qty, qry_BomLevel1_Comment.Comment
FROM
qry_BomLevel1_PartNo
LEFT JOIN
((qry_BomLevel1_Desc
LEFT JOIN
qry_BomLevel1_Rev ON (qry_BomLevel1_Desc.XRefConfigurationID = qry_BomLevel1_Rev.XRefConfigurationID)
AND (qry_BomLevel1_Desc.ChildRevNr = qry_BomLevel1_Rev.ChildRevNr)
AND (qry_BomLevel1_Desc.ChildID = qry_BomLevel1_Rev.ChildID))
LEFT JOIN
qry_BomLevel1_Comment ON (qry_BomLevel1_Rev.XRefConfigurationID = qry_BomLevel1_Comment.XRefConfigurationID)
AND (qry_BomLevel1_Rev.ChildRevNr = qry_BomLevel1_Comment.ChildRevNr)
AND (qry_BomLevel1_Rev.ChildID = qry_BomLevel1_Comment.ChildID))
ON (qry_BomLevel1_PartNo.XRefConfigurationID = qry_BomLevel1_Desc.XRefConfigurationID)
AND (qry_BomLevel1_PartNo.ChildRevNr = qry_BomLevel1_Desc.ChildRevNr)
AND (qry_BomLevel1_PartNo.ChildID = qry_BomLevel1_Desc.ChildID)
UNION ALL
SELECT
qry_BomLevel2_PartNo.Type, qry_BomLevel2_PartNo.PartNo,
qry_BomLevel2_Desc.Description, qry_BomLevel2_Rev.Revision,
qry_BomLevel2_PartNo.Qty, qry_BomLevel2_Comment.Comment
FROM
qry_BomLevel2_PartNo
LEFT JOIN
((qry_BomLevel2_Desc
LEFT JOIN
qry_BomLevel2_Rev ON (qry_BomLevel2_Desc.ChildID = qry_BomLevel2_Rev.ChildID)
AND (qry_BomLevel2_Desc.ChildRevNr = qry_BomLevel2_Rev.ChildRevNr)
AND (qry_BomLevel2_Desc.XRefConfigurationID = qry_BomLevel2_Rev.XRefConfigurationID))
LEFT JOIN
qry_BomLevel2_Comment ON (qry_BomLevel2_Rev.ChildID = qry_BomLevel2_Comment.ChildID)
AND (qry_BomLevel2_Rev.ChildRevNr = qry_BomLevel2_Comment.ChildRevNr)
AND (qry_BomLevel2_Rev.XRefConfigurationID = qry_BomLevel2_Comment.XRefConfigurationID))
ON (qry_BomLevel2_PartNo.XRefConfigurationID = qry_BomLevel2_Desc.XRefConfigurationID)
AND (qry_BomLevel2_PartNo.ChildRevNr = qry_BomLevel2_Desc.ChildRevNr)
AND (qry_BomLevel2_PartNo.ChildID = qry_BomLevel2_Desc.ChildID))
** I edited the code in here cause when I tried to add it as an answer it said it was to long. Ill get better at this. Thank you for the help as this got me up and working.