M
MeSteve
I have a union query that is doing almost what I need.
SELECT tbl_Projects.*, tblProjectMilestones.*
FROM tbl_Projects INNER JOIN tblProjectMilestones
ON tbl_Projects.[ProjectID] = tblProjectMilestones.[ProjectID]
WHERE tblProjectMilestones.[MilestoneID] = 6;
UNION
SELECT tbl_Projects.*, tblProjectMilestones.*
FROM tbl_Projects INNER JOIN tblProjectMilestones
ON tbl_Projects.[ProjectID] = tblProjectMilestones.[ProjectID]
WHERE tblProjectMilestones.[MilestoneID] = 7;
What I need to do is include the record where MilestoneID = 7 (if it
exists), if not I want MilestoneID = 6 to show. I only want one or the other
but this is returning both.
Said another way, if there is a record with MilestoneID = 7, don't show the
record where all else is same except MilestoneID = 6.
thanks.
SELECT tbl_Projects.*, tblProjectMilestones.*
FROM tbl_Projects INNER JOIN tblProjectMilestones
ON tbl_Projects.[ProjectID] = tblProjectMilestones.[ProjectID]
WHERE tblProjectMilestones.[MilestoneID] = 6;
UNION
SELECT tbl_Projects.*, tblProjectMilestones.*
FROM tbl_Projects INNER JOIN tblProjectMilestones
ON tbl_Projects.[ProjectID] = tblProjectMilestones.[ProjectID]
WHERE tblProjectMilestones.[MilestoneID] = 7;
What I need to do is include the record where MilestoneID = 7 (if it
exists), if not I want MilestoneID = 6 to show. I only want one or the other
but this is returning both.
Said another way, if there is a record with MilestoneID = 7, don't show the
record where all else is same except MilestoneID = 6.
thanks.