Hi All
Hope you are doing well today.
I am a bit stuck on the following query, any help on this will be greatly appreciated.
Code:
SELECT tblTracking.PortfolioCode, tblTracking.[CRG Deadline], qrybDistributionDeadline.Date, Count(tblTracking.[CRG Deadline]) AS [CountOfCRG Deadline], tblTracking.ProductType
FROM tblTracking LEFT JOIN qrybDistributionDeadline ON tblTracking.TrackingID = qrybDistributionDeadline.TrackingID
GROUP BY tblTracking.PortfolioCode, tblTracking.[CRG Deadline], qrybDistributionDeadline.Date, tblTracking.ProductType, Format(nz([qrybDistributionDeadline].[Date],Date()),"Short Date")
HAVING (((tblTracking.PortfolioCode)<>"630541" And (tblTracking.PortfolioCode)<>"630542") AND ((tblTracking.[CRG Deadline])<Date()) AND ((tblTracking.ProductType)<>"IT Board Papers") AND ((Format(nz([qrybDistributionDeadline].[Date],Date()),"Short Date"))>Format([CRG Deadline],"Short Date"))) OR (((qrybDistributionDeadline.Date) Is Null))
ORDER BY tblTracking.PortfolioCode
WITH OWNERACCESS OPTION;
I have 2 tables, one which holds all the clients data and the second which the user uses to sign off the date which the report was sent out.
What I am trying to do is show all the deadlines that where missed even if there is a null value in the field. The 2 fields I wish to do this by is CRG Deadline and qrybDistributionDeadline.Date. The query works when I run it but I am not getting all the values that I require. There seems to be some fields missing.
Any help on this would be great.
Thanks
Regards
Mark
Hope you are doing well today.
I am a bit stuck on the following query, any help on this will be greatly appreciated.
Code:
SELECT tblTracking.PortfolioCode, tblTracking.[CRG Deadline], qrybDistributionDeadline.Date, Count(tblTracking.[CRG Deadline]) AS [CountOfCRG Deadline], tblTracking.ProductType
FROM tblTracking LEFT JOIN qrybDistributionDeadline ON tblTracking.TrackingID = qrybDistributionDeadline.TrackingID
GROUP BY tblTracking.PortfolioCode, tblTracking.[CRG Deadline], qrybDistributionDeadline.Date, tblTracking.ProductType, Format(nz([qrybDistributionDeadline].[Date],Date()),"Short Date")
HAVING (((tblTracking.PortfolioCode)<>"630541" And (tblTracking.PortfolioCode)<>"630542") AND ((tblTracking.[CRG Deadline])<Date()) AND ((tblTracking.ProductType)<>"IT Board Papers") AND ((Format(nz([qrybDistributionDeadline].[Date],Date()),"Short Date"))>Format([CRG Deadline],"Short Date"))) OR (((qrybDistributionDeadline.Date) Is Null))
ORDER BY tblTracking.PortfolioCode
WITH OWNERACCESS OPTION;
I have 2 tables, one which holds all the clients data and the second which the user uses to sign off the date which the report was sent out.
What I am trying to do is show all the deadlines that where missed even if there is a null value in the field. The 2 fields I wish to do this by is CRG Deadline and qrybDistributionDeadline.Date. The query works when I run it but I am not getting all the values that I require. There seems to be some fields missing.
Any help on this would be great.
Thanks
Regards
Mark