Forum Topics : Support / error in CSV file ? why not make it a TXT instead ?
hello !
i'm trying to stuff the .csv file into my mySQL database, which does not allow the 'used' command.
therefore i used an import script, which seems to work fine.
Yet i get a mySQL error message at the moment of inserting the content:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '33996344", """33996351""", """GB""", """GBR""", """UNITED KINGD
I opened the .csv file and it seems odd to me, (but i'm not an expert so i expect to be wrong) that all the fields content are in one excell column, and not one column for each field. Also, doublequote signs are oddly organised:
33996344,"33996351","GB","GBR","UNITED KINGDOM"
whereas i would expect it to be inserted like this:
"33996344","33996351","GB","GBR","UNITED KINGDOM"
Could you please confirm how should the typical row look like? I will then transform the .csv into a txt file according to your answer.
PS: I am wondering why do you make it a .csv file and not a .txt file? would it be possible for you to do both? When i see how much postings are related to inserting csv into mySQL, i wonder if it wouldn't save you the time of answering these ;-)
Thanks a lot,
Alexandre
i'm trying to stuff the .csv file into my mySQL database, which does not allow the 'used' command.
therefore i used an import script, which seems to work fine.
Yet i get a mySQL error message at the moment of inserting the content:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '33996344", """33996351""", """GB""", """GBR""", """UNITED KINGD
I opened the .csv file and it seems odd to me, (but i'm not an expert so i expect to be wrong) that all the fields content are in one excell column, and not one column for each field. Also, doublequote signs are oddly organised:
33996344,"33996351","GB","GBR","UNITED KINGDOM"
whereas i would expect it to be inserted like this:
"33996344","33996351","GB","GBR","UNITED KINGDOM"
Could you please confirm how should the typical row look like? I will then transform the .csv into a txt file according to your answer.
PS: I am wondering why do you make it a .csv file and not a .txt file? would it be possible for you to do both? When i see how much postings are related to inserting csv into mySQL, i wonder if it wouldn't save you the time of answering these ;-)
Thanks a lot,
Alexandre
