Re: convert text file to database
От | Szentpali Janos |
---|---|
Тема | Re: convert text file to database |
Дата | |
Msg-id | 20080422100050.M37253@easynet.ro обсуждение исходный текст |
Ответ на | convert text file to database (e-letter <inpost@gmail.com>) |
Список | pgsql-novice |
> 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 -
В списке pgsql-novice по дате отправления: