The SQL below prompts me for the parameter indicated in red text when I add it. Originally I was using a similar sub query to select the status date but I was not getting expected results. I'm hoping this is something so obvious that I'm over looking... Any other suggestions are welcome too.
This is in Access 2003.
qry Recent Contract_Service_Level_Status
SQL:
The only reason I'm doing this at all is that joining in the appropriate query into another multijoin behemoth data set would make a slow query, run over lunch break slow.
This is in Access 2003.
Code:
UPDATE Contract_Service_Level INNER JOIN Contract_Service_Level_Status ON Contract_Service_Level.CSL_ID = Contract_Service_Level_Status.CSL_ID SET Contract_Service_Level.Current_Status_Date = Contract_Service_Level_Status.Status_Date, Contract_Service_Level.Current_Note = Contract_Service_Level_Status.Note, Contract_Service_Level.Current_Unapproved = Contract_Service_Level_Status.Unapproved
WHERE (((Contract_Service_Level_Status.CSL_ID) In (Select CSL_ID From [qry Recent Contract_Service_Level_Status] Where [qry Recent Contract_Service_Level_Status].CSL_ID = Contract_Service_Level_Status.CSL_ID And [qry Recent Contract_Service_Level_Status].MaxOfStatus_Date = [Red]Contract_Service_Level_Status.Status_Date[/red])));
qry Recent Contract_Service_Level_Status
SQL:
Code:
SELECT Contract_Service_Level_Status.CSL_ID, Max(Contract_Service_Level_Status.Status_Date) AS MaxOfStatus_Date
FROM Contract_Service_Level_Status
GROUP BY Contract_Service_Level_Status.CSL_ID;
The only reason I'm doing this at all is that joining in the appropriate query into another multijoin behemoth data set would make a slow query, run over lunch break slow.