0

I know MySQL but I don't know Access. I have nearly 1 million rows and I want only the rows between 300 000 and 500 000. I mean as seperate file. I don't need the ones before 300 000 and the ones after 500 000. How I'll do it?

The Access is 2013.

5
  • As it stands, this is not a programming question.
    – Remou
    Mar 16, 2013 at 19:43
  • No, it is a programming question. I was expecting an sql delete query.
    – ilhan
    Mar 16, 2013 at 19:51
  • 1
    If you wanted a delete query why did you ask how to "export" selected rows to a "separate file"...?
    – Gord Thompson
    Mar 16, 2013 at 20:12
  • ilhan Please improve and clarify your question. As it stands, it is not a programming question.
    – Remou
    Mar 16, 2013 at 20:22
  • May be this question should be moved to Super User.
    – ilhan
    Mar 16, 2013 at 20:29

2 Answers 2

1
  • Create a query that selects the rows you want to export and outputs all of the columns in the table. Such a query will look something like this:

enter image description here

  • Close and save the query. Give it a name like "toExport".

To export the rows to CSV, Excel, etc.

  • Right-click the query name in the object pane (on the left side of the Access window) and choose "Export", then choose the destination (type of file you want to create). The wizard will take you through the process.

To create a table in another Access database

  • Open the destination database, select the "External Data" tab, and choose "Access" under "Import & Link". Choose the "Import" option, then select the query you created in the source database. Be sure to choose the "As Tables" option under "Import Queries".

Access import options dialog

6
  • This is a valid solution, but this is not a programming answer and Stackoverflow is a programming site, so are you saying the question does not belong here?
    – Remou
    Mar 16, 2013 at 19:42
  • This exports the query, not the data. I think I'm missing something.
    – ilhan
    Mar 16, 2013 at 19:43
  • In MS Access 2013, right clicking will give you a list of possible export opeiotns - Excel, PDF, Word and so on. The data will be exported.
    – Remou
    Mar 16, 2013 at 19:46
  • I have selected Access and it exported the query itself.
    – ilhan
    Mar 16, 2013 at 19:48
  • I updated the answer for Access-to-Access transfers.
    – Gord Thompson
    Mar 16, 2013 at 20:03
2

If you can base the range on an ID, the query is simple enough:

DELETE
FROM Table1
WHERE Table1.ID<300000 Or Table1.ID>500000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.