Problems on "copy" statement

From: Leung Wing Lap Ellery <lap01(at)netvigator(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Problems on "copy" statement
Date: 2005-04-13 14:29:05
Message-ID: 425D2CB1.4050901@netvigator.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all!

When I want to use "copy" to move data in .csv, which has been formatted
to tab-formatted file, to my postgresql as follow (DB name: test,
tablename: hsi):

copy hsi from 'c:\java\hsi.txt'

it generated error:

ERROR: relation "hsi" does not exist
copy hsi from 'c:\java\hsi.txt'

if I use double quoted:

copy hsi from "c:\java\hsi.txt"

it generated:

ERROR: syntax error at or near ""c:\java\hsi.txt"" at character 15

Can anyone please tell me what's wrong with the above statements?

Thanks in advance for your kind help!

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Keith Worthington 2005-04-13 14:38:02 Re: Problems on "copy" statement
Previous Message David Orme 2005-04-13 14:05:10 Update from a subquery using where to match entries between tables