Re: Data loading from a flat file...

From: Angshu Kar <angshu96(at)gmail(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>, Angshu Kar <angshu96(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Data loading from a flat file...
Date: 2006-01-06 05:04:55
Message-ID: df8328740601052104k139a2111r4a3f6a0afb38c3bd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Could you please tell me what's the syntax with INSERT for this?

On 1/5/06, Bruno Wolff III <bruno(at)wolff(dot)to> wrote:
>
> On Thu, Jan 05, 2006 at 22:51:55 -0600,
> Angshu Kar <angshu96(at)gmail(dot)com> wrote:
> > Hi Pgsql,
> >
> > I've a table schema in pg say as:
> >
> > (A B C D E)
> >
> > where none of these fields allow null.
> >
> > Now, I've a flat file that has got tab-delimited data for B,C and E
> fields.
> > And A,B come from sequences.
> >
> > Could anyone please let me know how I can upload the complete dataset
> into
> > the table?
>
> Use COPY or INSERT with explicitly named columns. (I think this is a
> relatively new feature for COPY, but you can use it for INSERT in any
> version.)
>

--
Ignore the impossible but honor it ...
The only enviable second position is success, since failure always comes
first...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-01-06 05:05:45 Re: Data loading from a flat file...
Previous Message Bruno Wolff III 2006-01-06 05:04:22 Re: Data loading from a flat file...