L
LilMorePlease
I need a query that shows me all records both assigned and unassigned.
The unassigned would simply just have empty fields.
SELECT AssignedBatches.StartDate, MasterBatch.BatchNumber
FROM MasterBatch LEFT JOIN AssignedBatches ON MasterBatch.BatchNum =
AssignedBatches.BatchNum;
This shows me all the batch numbers. But as soon as I link another table to
it to show more related data, I get an Access error saying there are
ambigious joins and I need to create a seperate query first. I've assumed
this means I need to do a nested join, but I can't seem to get the syntax
correct.
Here's an example of how I think it should work with a field added from the
Employee table:
SELECT Employee.UserId
FROM Employee INNER JOIN (Select MasterBatch.BatchNumber,
AssignedBAtches.StartDate FROM MasterBatch LEFT JOIN AssignedBatches ON
MasterBatch.BatchNum = AssignedBatches.BatchNum) ON Employee.EmpNum =
AssignedBatches.EmpNum;
I've read that a Left Join can't be on the outside of the nested
statement...is that true?
Please help!
The unassigned would simply just have empty fields.
SELECT AssignedBatches.StartDate, MasterBatch.BatchNumber
FROM MasterBatch LEFT JOIN AssignedBatches ON MasterBatch.BatchNum =
AssignedBatches.BatchNum;
This shows me all the batch numbers. But as soon as I link another table to
it to show more related data, I get an Access error saying there are
ambigious joins and I need to create a seperate query first. I've assumed
this means I need to do a nested join, but I can't seem to get the syntax
correct.
Here's an example of how I think it should work with a field added from the
Employee table:
SELECT Employee.UserId
FROM Employee INNER JOIN (Select MasterBatch.BatchNumber,
AssignedBAtches.StartDate FROM MasterBatch LEFT JOIN AssignedBatches ON
MasterBatch.BatchNum = AssignedBatches.BatchNum) ON Employee.EmpNum =
AssignedBatches.EmpNum;
I've read that a Left Join can't be on the outside of the nested
statement...is that true?
Please help!