Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > convert text fi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3080 of 3175
Post > Topic >>

convert text file to database

by inpost@[EMAIL PROTECTED] (e-letter) Apr 18, 2008 at 02:29 PM

Readers,

I re-formatted an extract from my file of chess matches to:

Event,Online
Game,Site,www.flyordie.com,Date,yyyy/mm/dd,Round,1,White,djride,Black,kasparov777,Result,1-0,Termination,normal,UTCDate,2008/01/05,TimeControl,1200,moves,1.
c4 e5...25. Qh7# 1-0
Event,Online
Game,Site,www.flyordie.com,Date,2008/01/05,Round,1,White,pawnsrow,Black,djride,Result,0-1,Termination,normal,UTCDate,yyyy/mm/dd,TimeControl,1200,moves,1.
d4 d5...33. Bf3 Rxe5 0-1

I tried to im****t the csv file using the command:

chessmatches=# COPY chessgames FROM '/absolute/path/filename.csv';
ERROR:  invalid input syntax for integer: "Event..."

CONTEXT:  COPY chessgames, line 1, column id: "Event,..."

My first thoughts are that I need to create a first column entitle
'column id' but there is no reference to the requirement for this in
the section of the manual COPY. SO what is required please?

Thanks,

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 2 Posts in Topic:
convert text file to database
inpost@[EMAIL PROTECTED]   2008-04-18 14:29:14 
Re: convert text file to database
tgl@[EMAIL PROTECTED] (T  2008-04-18 10:49:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 4:28:53 CDT 2008.