If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Multiple records from last 2 dates

Hi all, I am sure this has been covered somewhere but google and site search didn't have my reply so forgive me. I am trying to run a query that will return all of the records from the previous 2 dates. These dates are not regular intervals nor are they consistent so the dates might be yesterday and today or they might be 8 months ago and 2 months ago. Also for each date there will be multiple records. Hope that makes sense.

Maybe I'm missing something, too, but the dates apparently are the last two dates in the Table, whatever they are, not two specific dates.

Linq ;0)>

...good point, well made

not to sure you can get multiple rows for the last to days in one hit, but Im open to persuasion.

right now Id do this as a two part process
first find the TOP two dates, then use those dates as a feed stock into a where clause and pull all orws on those dates.
you could implement this as a stored procedure, assumign you are using Access 2010 or later
if not then you coudl fake a stored procedure using a function