SELECT dbo_V_EN_PERFREP.*
FROM dbo_V_EN_PERFREP
WHERE dbo_V_EN_PERFREP.Del_Date IN
SELECT TOP 2 Del_Date
FROM dbo_V_EN_PERFREP
WHERE dbo_V_EN_PERFREP.Account = dbo_V_EN_PERFREP.Account
ORDER BY dbo_V_EN_PERFREP.Del_Date DESC, dbo_V_EN_PERFREP.Ticket DESC)
Here's what I come up with... Any...
I have an sql data base that I connect to via MS Access.
Table has customer transactions...Each transaction has a unique id
Using the TOP predicate I can get the 2 most recent transactions in the table. The problem is that
I wish to return the last 2 transactions for every customer.
Any...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.