I
inungh
I tried to get records from parent table which does not have child in
the children table and have following SQL statement.
I got syntax error in the having clause.
"having (select count(*) from tbl|ActivityReasonReview where
[tblActivityReason].[ReasonId] = [tblActivityReasonReview].[ReasonID]
= 0) "
am I missing something here?
Your help is great appreciated,
SELECT tblActivityReason.ReasonID, tblActivityReason.Employee_ID,
tblEmployee.First_Name+" "+tblEmployee.Last_Name AS Employee,
tblActivityReason.ActivityDate, tblActivityReason.ActivityCode,
TblActivetyCode.Activity_description
FROM ( tblActivityReason INNER JOIN TblActivetyCode ON
TblActivetyCode.Activity = tblActivityReason.ActivityCode) INNER JOIN
tblEmployee ON tblActivityReason.Employee_ID = tblEmployee.Employee_ID
WHERE ((tblActivityReason.Employee_ID)=[forms]![fservicelevel]!
[cmbEmployeeName])
having (select count(*) from tbl|ActivityReasonReview where
[tblActivityReason].[ReasonId] = [tblActivityReasonReview].[ReasonID]
= 0)
ORDER BY tblActivityReason.ActivityDate DESC;
the children table and have following SQL statement.
I got syntax error in the having clause.
"having (select count(*) from tbl|ActivityReasonReview where
[tblActivityReason].[ReasonId] = [tblActivityReasonReview].[ReasonID]
= 0) "
am I missing something here?
Your help is great appreciated,
SELECT tblActivityReason.ReasonID, tblActivityReason.Employee_ID,
tblEmployee.First_Name+" "+tblEmployee.Last_Name AS Employee,
tblActivityReason.ActivityDate, tblActivityReason.ActivityCode,
TblActivetyCode.Activity_description
FROM ( tblActivityReason INNER JOIN TblActivetyCode ON
TblActivetyCode.Activity = tblActivityReason.ActivityCode) INNER JOIN
tblEmployee ON tblActivityReason.Employee_ID = tblEmployee.Employee_ID
WHERE ((tblActivityReason.Employee_ID)=[forms]![fservicelevel]!
[cmbEmployeeName])
having (select count(*) from tbl|ActivityReasonReview where
[tblActivityReason].[ReasonId] = [tblActivityReasonReview].[ReasonID]
= 0)
ORDER BY tblActivityReason.ActivityDate DESC;