View Single Post

   
  #1 (permalink)  
Old 04-17-2008, 09:42 PM
Leung Wing Lap Ellery
 
Posts: n/a
Default Problems on "copy" statement

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!

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote