Generically, you would need something like
SELECT Region, OtherField
FROM [Your Table]
WHERE YourTable.PrimaryKeyField in
(SELECT TOP 50 PrimaryKeyField
FROM [Your Table] as Temp
WHERE Temp.Region = [Your Table].Region
ORDER BY Temp.OtherField, Temp.PrimaryKeyField)
For more specifics, you might try posting the Top 50 query you used that got
the Top 50 from the entire table. Then someone might be able to modify it
to get what you want.
eagles73 said:
Sorry, but what I meant to say was that it did not give me the 50 per
region.
:
Hi Eagles73,
The first thing that you will have to do is order the query by the
field taht you want to get the top 50 off. Then you must enter 50 the
'top values' box or if you are editing your sql directly type SELECT
TOP 50 at the beginning of your sql statement.
Good luck
Nick
eagles73 wrote:
I need help with a query for a DB that has over 1 mil records. The DB
contains over 30 regions and I want the query for 50 records only for
each
region. Can anyone help?