Pulling a sample and removing linked table

G

Guest

Two important questions.

1. I have a database of around 77,000. I need to pull a random sample of
6,000 of them. Is there a way to do this in Access? Any ideas?

2. Most of the time I open my database from another file, leading the table
to be linked to that file. Then I make some changes in Access and need to
export it back out in another file. However, because the file is linked it
won't let me do this. I often end up copying and pasting all the records
manually (in chunks of around 20,000) into a new table. Is there a way to
give access a command to copy the linked table into a brand new table??

Thanks!
 
G

Guest

Add a Autonumber field with Increment property set to random.
Create a select query and sort on the new field.
In SQL insert TOP 6000 after SELECT. Like -- SELECT TOP 6000

This will give you 6000 randomly selected.
 
G

Guest

Ok, I see how this works. However, the autonumber field is numbering the
items in consecutive order, starting with 1, even though I have chosen
random. Then when I do the query it merely selects the first 6000 entries in
the database. What am I doing wrong?
 
G

Guest

I tried it and with a short list (<100) it appeared to be consecutive but
looking at the end I see numbers that are out of order. I did one with >3000
records an it is truely random to include negative numbers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top