Jump to content

Finding "N" records


Mark Hardee
 Share

This topic is 5656 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have the need to pull only the first 5 instances of a database based on a keycode.

For instance, the database is approx 75,000 records, there are 12 different keycodes. I'd like to pull the first 5 occurances of each keycode and export to a separate file. (a Sample data file for lack of a better term)..

Before I go struggling with this, I thought I'd ask.

Thanks for any help that can be offered..

Link to comment
Share on other sites

When you mention a sample, it implies a random choice. If not randomized, you will ALWAYS get the SAME first 5 - is that what you want?

It is usually a one-time sampling of the data. When a mailing is done, sometimes the database is flagged with a field that indicates they wish to receive a that record as a sample..

Most time, there are no such flags. So, if there was a STATE field, lets say, and they want 5 samples of each state - it would result in a total of 250 records. Those 250 would be exported and place in a print stream for the samples. The original records would remain for the final print run.

Randomization should not matter, but if it did, I would assume that wouldn't be that hard...

Thanks for your perserverence!

Link to comment
Share on other sites

This topic is 5656 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.