Hello,
I have a query to show the maximum transaction dates in my TEST table. Here is the syntax:
Query1 = "SELECT TEST.MEMBER, Max(TEST.TransactionDate) AS MaxTrans FROM TEST GROUP BY TEST.HICN;"
And then I want to have a subquery to show all the other records that are not in Query1, because I want to delete them from the table.
I tried using this syntax for a delete query:
"DELETE TEST.TransactionDate, *
FROM TEST
WHERE TEST.TransactionDate Not In (SELECT DMax("MaxTrans","Query1","MEMBER='" & [MEMBER] & "'") AS MaxOfTrans
FROM TEST);"
This works but takes forever to run. I need to have something that runs more efficiently. If you guys can help I would appreciate it.