[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Import scripts
- Subject: Re: Import scripts
- From: "Dave Coventry" <..hidden..>
- Date: Thu, 21 Aug 2008 11:59:43 +0200
Date: Wed, 20 Aug 2008 08:24:38 -0700 From: "Chris Travers"
<..hidden..>
> There is no script however. What you need to do is:
> 1) create a temporary table with the same column number as your
> spreadsheet. Usually I use text fields for everything because I find
> that is easier to deal with.
> 2) In psql, COPY the table from the file (see \h COPY for help)
> 3) Use sql queries to move the data in.
That sounds easy enough.
> If you post the columns you need to import here, I can provide a quick
> mapping to the db schema.
I'll insert one of the items and use pgadmin3 to see which columns are
populated and then structure my query to suit.
> Since every spreadsheet is different, every import tends to be
> different.
Well I'm going to convert the data into a comma (or tab) deliminated
file so it shouldn't be too difficult.
Thanks Chris.