G
Guest
In the query below, the sub-queries "TRI OCS CPA join" and "PAR3417 results
vs detects by works" do not have the same structure; however, the things
selected from them (and unioned as far as I know) do have the same structure.
I tried a similar query out and it did seem to union properly but I would
like to confirm that I actually am unioning things with matching structure.
The script on either side of the union is the same except for the first is a
left join and the other a right join.
SELECT TOC.[Works_number], TOC.[Works_name], TOC.[Source_ name],
TOC.[TRI.Expr1], TOC.[OCS.Expr1], TOC.[Expr1], PAR.[Expr1]
FROM [TRI OCS CPA join] TOC LEFT JOIN [PAR3417 results vs detects by works]
PAR
ON TOC.[Works_number]=PAR.[Works_number]
UNION
SELECT TOC.[Works_number], TOC.[Works_name], TOC.[Source_ name],
TOC.[TRI.Expr1], TOC.[OCS.Expr1], TOC.[Expr1], PAR.[Expr1]
FROM [TRI OCS CPA join] TOC RIGHT JOIN [PAR3417 results vs detects by works]
PAR
ON TOC.[Works_number]=PAR.[Works_number];
Thanks,
Pat
vs detects by works" do not have the same structure; however, the things
selected from them (and unioned as far as I know) do have the same structure.
I tried a similar query out and it did seem to union properly but I would
like to confirm that I actually am unioning things with matching structure.
The script on either side of the union is the same except for the first is a
left join and the other a right join.
SELECT TOC.[Works_number], TOC.[Works_name], TOC.[Source_ name],
TOC.[TRI.Expr1], TOC.[OCS.Expr1], TOC.[Expr1], PAR.[Expr1]
FROM [TRI OCS CPA join] TOC LEFT JOIN [PAR3417 results vs detects by works]
PAR
ON TOC.[Works_number]=PAR.[Works_number]
UNION
SELECT TOC.[Works_number], TOC.[Works_name], TOC.[Source_ name],
TOC.[TRI.Expr1], TOC.[OCS.Expr1], TOC.[Expr1], PAR.[Expr1]
FROM [TRI OCS CPA join] TOC RIGHT JOIN [PAR3417 results vs detects by works]
PAR
ON TOC.[Works_number]=PAR.[Works_number];
Thanks,
Pat