Unsupported Screen Size: The viewport size is too small for the theme to render properly.

CSV import

forums forums SQLyog Using SQLyog CSV import

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #8053
      amarone88
      Member

      Hi everybody.

      I'm trying to import data from a CSV file created by a Macintosh FileMaker.

      Separator is the classical comma (,), columns are enclosed by ” and records are terminated by n (my text editor, NoteTab Light, identifies int as ^P). I set parameters in the dialog windows as required and it seems they are correct. It works, but SQLYog imports only the first record and then stops!

      MySQL version is 4.1.0-alpha-max-nt, running on Windows 2000 Professional SP3.

      Here there is the SQL command:

      load data local infile 'D:/sviluppo/timesheet/gfm.csv' into table `sttimesheet`.`gfm` fields escaped by '\' terminated by ',' enclosed by '”' lines terminated by 'n' ( field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11)

      Is there something more I must do to mare it import all the records?

      Thx

      Iacopo

    • #14558
      Shadow
      Member

      Perhaps the end-of-line character (/n) is not reconized properly. Convert the CSV file, then retry importing.

    • #14559
      amarone88
      Member

      Even the command line gives me the same problem, it seems not to be a SQLyog bug =___=''

      What do you mean by converting the CSV file? Into what should I convert it? O.O''

      Thanks

      I tried operning the CSV with Microsoft Word and it shows the new line character properly.

      Some other elements: I first had my CSV with every line terminating with n but the last column was not followed by a comma. This way, the command imported only the first line anyway, but the last column was followed by the first column of the second record:

      2/01/2003 – TV – H – LS – 60 – – – – S/AGGIORNAM/RICERCA Articoli vari arretrati – AI””2/01/2003

      (AI””2/01/2003 is the last imported column, as you can see the date should be the first column of the second record. Here I separated columns by -)

    • #14560
      amarone88
      Member

      Ok, problem solved. It was due to a wrong character that Macintosh FileMaker added at the end of the line.

      I deleted it with a text editor and now all works fine.

      Thanks, bye ^____^

Viewing 3 reply threads
  • You must be logged in to reply to this topic.