Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL
От | Mike Mascari |
---|---|
Тема | Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL |
Дата | |
Msg-id | 19991002051523.821.rocketmail@web2101.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL
|
Список | pgsql-general |
--- "Doran L. Barton" <fozz@iodynamics.com> wrote: > Not long ago, PostgreSQL proclaimed... > > What is the best way to import into a PostgreSQL > database data from a > > Microsoft Access database? > > > > Should I export the data to a pipe or comma > delimited file and then import? > > *But how can I do that* ? > > Once you have an Access table exported using some > kind of delimiter, use > the COPY command to import it into a table in > PostgreSQL. > > psql> COPY INTO TABLE1 FROM > '/home/joe/access_export.csv' USING > USING DELIMITER ','; > > I'm not aware of any way to import table schemas > from Access- you'll > probably still have to do that by hand. > > -=Fozz One way is to (a) install and configure the PostgreSQL ODBC driver, and (b) export the selected tables to PostgreSQL via ODBC using the File->Save As/Export... command. The ODBC driver will automatically issue the appropriate CREATE TABLE statement and insert the data from the existing Access database. However, you may not be satisfied with the data-type mapping the ODBC driver chooses to generate for your existing tables. Another way is to use a PostgreSQL upsizing tool. I have seen a post on this list several months ago regarding this tool, which looks promising. The search engine for the mailing list archives at www.postgresql.org appeared broken as of a couple of days ago and I don't have the URL to the page, but an upsizing tool does, indeed, exist. Good luck, Mike Mascari (mascarim@yahoo.com) ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
В списке pgsql-general по дате отправления: