C
colin_e
I seem to have developed a talent for breaking Access. I have a table of user
data with near-duplicate rows. I want to pull out the most recent account for
each user based on their name (yes I know this is not robust, the "John
Smith"s will be under-represented, but that's ok).
The subquery here works fine standalone
SELECT MAX(uid) FROM [Accounts Accessed] GROUP BY (lastname + "|" + firstname)
Note: I had to concatenate the first and last name to avoid a problem in
Access with multiple grouping expressions in subqueries.
The full version (still pretty simple) fails with an "Object invalid or no
longer set" error.
SELECT * FROM [Accounts Accessed] AS a WHERE a.uid IN (SELECT MAX(uid) FROM
[Accounts Accessed] GROUP BY (lastname + "|" + firstname));
Is this retrievable, or am I going to have to go down the route of using
intermediate queries?
data with near-duplicate rows. I want to pull out the most recent account for
each user based on their name (yes I know this is not robust, the "John
Smith"s will be under-represented, but that's ok).
The subquery here works fine standalone
SELECT MAX(uid) FROM [Accounts Accessed] GROUP BY (lastname + "|" + firstname)
Note: I had to concatenate the first and last name to avoid a problem in
Access with multiple grouping expressions in subqueries.
The full version (still pretty simple) fails with an "Object invalid or no
longer set" error.
SELECT * FROM [Accounts Accessed] AS a WHERE a.uid IN (SELECT MAX(uid) FROM
[Accounts Accessed] GROUP BY (lastname + "|" + firstname));
Is this retrievable, or am I going to have to go down the route of using
intermediate queries?