kentwoodjean
Technical User
Not sure my description accurately says what I am trying to do. Have a table (tblLastUpdated) that contains information about contracts and is updated daily based on a auto download. The primary date field is "recvdDt" that describes when actual case was received, "Date1" that tells me when the department began working on the contract, and "CloseDt" that tells me when the case was removed from open inventory. There is no reference to the current date. I need to record the daily inventory, or total number of "Open" cases daily by date. This table retains the entire history of activity regarding each contract. Using this table I am able to pull the current inventory (for today) but what I don't know how to do is get my query to pull the current inventory figure today as well as the Inventory # from previous dates. Is there a way that I can do this?
Below is the sql for my inventory query. Also, I pull my count by RespCd.
SELECT Count(tblLastUpdated.[Resp Cd]) AS [CountOfResp Cd]
FROM tblLastUpdated
WHERE (((tblLastUpdated.[Resp Cd])="790" Or (tblLastUpdated.[Resp Cd])="792" Or (tblLastUpdated.[Resp Cd])="798") AND ((tblLastUpdated.[Closed Dt]) Is Null));
Below is the sql for my inventory query. Also, I pull my count by RespCd.
SELECT Count(tblLastUpdated.[Resp Cd]) AS [CountOfResp Cd]
FROM tblLastUpdated
WHERE (((tblLastUpdated.[Resp Cd])="790" Or (tblLastUpdated.[Resp Cd])="792" Or (tblLastUpdated.[Resp Cd])="798") AND ((tblLastUpdated.[Closed Dt]) Is Null));