Outer Join

S

Steve

Help! I'm hitting a brick wall. I need to create a full outer join from 2
tables called inventory and aw pc assets but cannot get my syntax to work.
Here's what I have. Can someone please assist?

SELECT Inventory.*,Aw pc assets.*
FROM Inventory AS Inventory LEFT JOIN
Aw pc assets AS Aw pc assets ON Inventory.ID =Aw pc assets.ID
UNION ALL
SELECT Inventory.*, Aw pc assets.*
FROM Inventory AS Inventory RIGHT JOIN
Aw pc assets AS Aw pc assets ON Inventory.ID = Aw pc assets.ID
WHERE Inventory.ID Is Null;
 
M

Michel Walsh

Use [ ] around the illegal table name (and also illegal as alias): Ac pc
assets

(8 places)

SELECT Inventory.*,[Aw pc assets].*
FROM Inventory AS Inventory LEFT JOIN
[Aw pc assets] AS [Aw pc assets] ON Inventory.ID =[Aw pc assets].ID
UNION ALL ...



Vanderghast, Access MVP
 
Top