doing a query based on record count

  • Thread starter Thread starter bd
  • Start date Start date
B

bd

is it possible to do a query in access based on record count.

For instance, I have a table with 500,000 records in it, can I place
something in my query to go against the record count.

I would like to break it down into chunks of 65,000 so that I can export my
results out to excel.

Thanks
 
Try using this to split into groups where your primary key as field Prim --
SELECT a.Column1, (COUNT(*)\((DCount("Prim","YourTable-4")\[Enter number to
divide])+1))+1 AS rank
FROM [YourTable-4] AS a LEFT JOIN [YourTable-4] AS b ON a.Prim>=b.Prim
GROUP BY a.Column1;
 
Back
Top