Reputation: 339
--SOLVED--
I'm having a problem with a query in Microsoft Access.
I need this query to show a list of entries where a specific Date field is empty. So it must sort and still show all the data, but only for entries where that specific date is missing.
There are a lot of dates in the table.
When I create a filter or just add criteria to the specific field in "Design View", it runs the query but it's empty without fail every time.
The field format is naturally a "Date" type field in the table.
I hope anyone can help me.
Thank you.
SQL BELOW:
SELECT rptClaimDateEmpty.Claim_Date, *
FROM (SELECT tblContainers.*, tbluCommodities.Commodity,
tbluContainerSizes.ContainerSize, tbluCountryOfLoading.CountryOfLoading,
tbluCountryOfOrigin.CountryOfOrigin, tbluShippers.Shipper,
tbluShippingLines.ShippingLine, tbluPortOfLoading.PortOfLoading,
tblBOLDates.BOLNumber FROM tblBOLDates INNER JOIN (tbluPortOfLoading RIGHT
JOIN (tbluShippingLines RIGHT JOIN (tbluShippers RIGHT JOIN
(tbluCountryOfOrigin RIGHT JOIN (tbluCountryOfLoading RIGHT JOIN
(tbluContainerSizes RIGHT JOIN (tbluCommodities RIGHT JOIN tblContainers ON
tbluCommodities.CommodityID = tblContainers.CommodityID) ON
tbluContainerSizes.ContainerSizeID = tblContainers.Container_SizeID) ON
tbluCountryOfLoading.CountryOfLoadingID =
tblContainers.Country_of_LoadingID) ON tbluCountryOfOrigin.CountryOfOriginID
= tblContainers.Country_of_OriginID) ON tbluShippers.ShipperID =
tblContainers.ShipperID) ON tbluShippingLines.ShippingLineID =
tblContainers.Shipping_LineID) ON tbluPortOfLoading.PortOfLoadingID =
tblContainers.Port_of_LoadingID) ON tblBOLDates.BOLDateID =
tblContainers.BOLDateID) AS rptClaimDateEmpty;
I just need it to sort via the the "Claim Date" field where "Claim Date" is empty.
Upvotes: 0
Views: 2685
Reputation: 55816
Wouldn't it just be:
SELECT *
FROM (...) AS rptClaimDateEmpty
WHERE rptClaimDateEmpty.Claim_Date Is Null;
Upvotes: 1