On Wed, 2016-01-20 at 12:05 +0200, Ian Whitfield wrote:
> Hi All
> 
> I have been trying to import a CSV file from Calc into MySQL to run
> with 
> Base for over a week now and can not believe this is so difficult to
> do 
> so I'm hoping some other Base users might have cracked this one!!
> 
> My OpSys is PClinuxOS - 32-bit and MySQL is ver 5.1.73. Everything is
> running on localhost.
> 
> My CSV file is in Calc and has 2600 rows and 78 cols. I save it as a
> CSV 
> file which is 717.8Kb in size. Field Names are in row 1.
> 
> I have tried many times with phpMyAdmin with no luck and today I 
> installed MySQL Workbench - also no luck.
> 
> In all cases I get the error ...
> 
> MySQL said: Documentation
> #1064 - 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 'varchar(10), `NULL` varchar(10), `NULL` varchar(10), `NULL` 
> varchar(21), `NULL` ' at line 1
> 
> MyAdmin seems to stop after only 38 fields and the error does not
> show 
> the field names in the error. Also it is not MY SQL syntax it is 
> MyAdmin's syntax!!
> 
> Workbench says - ERROR 1064 (42000) at line 1: 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 
> 'RecordID,Status,StatusGraphic,Title,PrefFirstName,FirstName,LastName
> ,Maiden/Form' 
> at line 1
> Operation failed with exitcode 1.
> 
> Can anyone help me out please. I'm NOT a Database expert just a user
> and 
> must get this DB up and running again ASAP!!
> 
> Many, many thanks
> 
> IanW
> Pretoria RSA
> 

I did something similar recently. You might succeed if you change the
CSV options: line separator LF, enclose strings in ", field separator ;

If I remember rightly, it did not cope well with field separator ,

Cheers
Harvey


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to