Hello,
I am trying to show all rows of data between 2 tables and merge what is common. I think I got stuck at the "WHERE" part and now my query is not working:
SELECT DISTINCTROW Ramco_Modified.[Shipping Location], Ramco_Modified.[Contract #], Ramco_Modified.Day, Ramco_Modified.Date, Ramco_Modified.[Shift End Date], Ramco_Modified.[Employee Name], Protos_Modified.Start, Protos_Modified.End, Protos_Modified.[In 1], Protos_Modified.[Out 1], Protos_Modified.[MINUTES Current Day], Protos_Modified.[MINUTES Next Day], Protos_Modified.[Unpaid Break Hours], Protos_Modified.[Actual Hours], Protos_Modified.[Delta Hours], Ramco_Modified.[Actual Time In], Ramco_Modified.[Actual Time Out], Ramco_Modified.[Lunch Hrs], Ramco_Modified.[Effective Hrs], Ramco_Modified.[MINUTES Current Day], Ramco_Modified.[MINUTES Next Day]
FROM Ramco_Modified LEFT JOIN Protos_Modified ON Ramco_Modified.[Shipping Location] = Protos_Modified.Name
Union
SELECT DISTINCTROW Ramco_Modified.[Shipping Location], Ramco_Modified.[Contract #], Ramco_Modified.Day, Ramco_Modified.Date, Ramco_Modified.[Shift End Date], Ramco_Modified.[Employee Name], Protos_Modified.Start, Protos_Modified.End, Protos_Modified.[In 1], Protos_Modified.[Out 1], Protos_Modified.[MINUTES Current Day], Protos_Modified.[MINUTES Next Day], Protos_Modified.[Unpaid Break Hours], Protos_Modified.[Actual Hours], Protos_Modified.[Delta Hours], Ramco_Modified.[Actual Time In], Ramco_Modified.[Actual Time Out], Ramco_Modified.[Lunch Hrs], Ramco_Modified.[Effective Hrs], Ramco_Modified.[MINUTES Current Day], Ramco_Modified.[MINUTES Next Day]
FROM Ramco_Modified RIGHT JOIN Protos_Modified ON Ramco_Modified.[Shipping Location] = Protos_Modified.Name
Where Ramco_Modified.[Shipping Location] Null;