From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Alex Marinov <alex(at)tennisround(dot)com> |
Cc: | austinpug(at)postgresql(dot)org |
Subject: | Re: Fwd: PostgreSQL questions - copy / paste new data and updating records |
Date: | 2011-09-26 13:32:59 |
Message-ID: | CAHyXU0wB1SzLyvsT-nQzfWT2KYmx6dNuTm0WEiskvqqn+iuqgA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | austinpug |
On Sun, Sep 25, 2011 at 8:27 PM, Alex Marinov <alex(at)tennisround(dot)com> wrote:
> Hi,
>
> My name is Alex and I'm part of a small team working on
> http://www.tennisround.com/ - a tennis directory and scheduling platform.
>
> I'm looking for help with a couple of things - 1) importing data from Excel
> into Postgresql on an ad-hoc basis - copy / paste style or through the
> PgAdmin UI and 2) looking up specific records (CTRL+F style or search by
> keyword).
The best way to import data from excel is going to be programatically.
What I typically do is save the excel sheet as a csv delimited text
file and import it to a staging table with postgres's built in 'copy'
(which has a csv switch). The copy command can be invoked from
pgadmin or through psql via a script. By staging table I mean a
specially designated table that contains all text fields for the
import data. From there, you can move the data to proper tables with
queries.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Jon Erdman | 2011-09-26 19:50:11 | Re: Fwd: PostgreSQL questions - copy / paste new data and updating records |
Previous Message | Alex Marinov | 2011-09-26 01:27:01 | Fwd: PostgreSQL questions - copy / paste new data and updating records |