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 > Re: convert tex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3084 of 3323
Post > Topic >>

Re: convert text file to database

by ianus@[EMAIL PROTECTED] ("Szentpali Janos") Apr 22, 2008 at 01:03 PM

> I amended a copy of my csv files as follows:
>
2,OnlineGame,wwwflyordiecom,yyyy/mm/dd,1,player1,player2,0-1,normal,yyyy/mm/dd,1200,1d4d5...33Bf3Rxe50-1
>
3,OnlineGame,wwwflyordiecom,yyyy/mm/dd,1,player1,player2,0-1,normal,yyyy/mm/dd,1,player1,player2,1200,1e4d52e5d4...Nxf2#0-1
> Compared to my original csv file, I had to remove the field names
that...

You can insert the full url with no special formating needed if you
respect
the csv standard: it says strings should be enclosed in pairs of double
quote
characters. So if you change

2,OnlineGame,wwwflyordiecom,yyyy/mm/dd,1,player1,player2,0-1,normal,yyyy/mm/dd,1200,1d4d5...33Bf3Rxe50-1
to

2,"OnlineGame","http://www.flyordie.com/","yyyy/mm/dd",1,"player1","player2","0-1","normal","yyyy/mm/dd",1200,"1d4d5...33Bf3Rxe50-1"

it will work. You can use other characters than double quote (") for
string
delimiters; in that case you should use the QUOTE option of the CSV option
to
specify the new string delimiter. If a string delimiter exists in the
string,
it can be "escaped" by doubling it:

x said "Go away"

could be written as

"x said ""Go away"""

-- 
Szentpáli János



--------------------------------------------------

easynet.ro - Best free webmail service hosted by Idilis
..........................................................
Idilis - Internet Provider :: www.idilis.net
Inchiriem conexiuni radio si in zone neracordate la coloana - Broadband
Wireless Idilis -



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




 1 Posts in Topic:
Re: convert text file to database
ianus@[EMAIL PROTECTED]   2008-04-22 13:03:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Dec 5 5:42:15 CST 2008.