Re: [SQL] problem with copy command

2001-04-11 Thread Oliver Elphick
Here is a method of filtering out the duplicate keys from the input file: Let us assume that the input data is in /tmp/table.in, that that file is tab-delimited and that the primary key is in field 2. psql -d database -c "COPY table TO '/tmp/table.1'" psql -d database -c "COPY table TO '

Re: [SQL] problem with copy command

2001-04-11 Thread George Moga
Jaruwan Laongmal wrote: > dear all, > I currently using postgresql v7.0.3 > when i import text file to table with command "copy tablename from > '/tmp/a.txt'; > and it shows > "copy: line 20, Cannot insert a duplicate key into unique index testpri_pk" > ,then it exits with doing nothing. > > I wa