Thursday, June 30, 2016

Importing Access Tables into Sqlite

There are numerous ways to do this, this is how I did it.
  1. Download LibreOffice.
  2. Use Base to open your access .mdb database
  3. Right click on the table, click copy.
  4. Open Calc, create a new spread sheet, control V to paste in data that is in memory from when you right clicked copy on the table in Base.
  5. Export your new spread sheet in CVS format (I left all the default options).
  6. Open your SQLite DB (I use the SQLite Manager Plugin for Firefox to Manage SQLite DBs).
  7. Import the CSV file (again I left all the defaults except I did click use the first row as a header).
  8. Once imported, you can tweak the headers.  If the datatypes are slightly off, you might have to create a new table how you like it and then select into that table from the newly created imported table.
This was good for a simple table with about 30000 records.  Your mileage may very.  Happy coding.

No comments: