Cool, that does it! Works on the MS Access dev machine too (well, if LIMIT is replaced with TOP).
And unless I'm misunderstanding how this works, I can use add
WHERE j1.name = ? AND j1.column IN ( ?, ?, ... )
to filter the results.
If I give the inner select a temporary name, I should still be able to do a WHERE clause on values too, right?
Main Topics
Browse All Topics





by: virmaiorPosted on 2008-07-22 at 09:23:14ID: 22061015
well, make sure that all of your fields are INDEXED, try this:
SELECT DISTINCT row, DISTINCT col,
(SELECT value FROM journal j2 WHERE j1.row = j2.row AND j1.col = j2.col ORDER BY date DESC LIMIT 1 ) FROM journal j1