我必须显示不在“timecard”表中的记录-
tcID Primary int(11)
RequestID int(11)
StaffID int(11)
ShiftStartDate date
ShiftEndDate date
JobStartTime time
JobEndTime time
lunchTaken time
ApprovalCode varchar(45)
查询:
SELECT *
FROM acceptedrequest ar
LEFT JOIN staff s ON s.StaffID = ar.StaffID
LEFT JOIN staffposition sp ON sp.PositionCode = s.PositionCode
WHERE
ar.AgencyID = 0
AND ar.RequestID = 2364
and RepalceStatus = 0
and ar.CancelStatus = 0
and ar.BroadcastStatus = 0
1条答案
按热度按时间9jyewag01#
请提供更多详细信息,如:所有表信息及其关联方式。
如果我假设acceptedrequest人员不在timecard人员中,请尝试以下操作:
希望有帮助!!!