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 5 reply threads
  • Author
    Posts
    • #8077

      Hi – my first post.

      I am testing a CSV import from a file with records terminated by CRLF and is like:-

      1001,”Direct Advertiser”

      1003,”Mediaedge:cia (VIC)”

      The table schema is ID bigint and name char(50)

      The imported records retain the quote characters and appear to have a non print character at the end of the name field. This I don't want. I am using the latest version downloaded for trial two days ago.

      Could I have a guide as to how I should set the import properties to get it right please?

    • #14619
      Shadow
      Member

      Fields terminated by: ,

      Fields OPTIONALLY enclosed by: “

      Lines terminated by: n

      Escaped by: \

      This is it. The problem is that certain applications use different EOL characters, so the import may handle the line breaks incorrectly.

    • #14620

      Sorry Shadow, I tried your suggestion, but when I select:-

      Fields OPTIONALLY enclosed by: “

      I import one record which still has quotes. Here is the display after the import and F5:-

      3006 “Boots Healthcare Australia P/L” 3007,”Advanced H

      Using XTREE to display the csv file in Hex, I can see the EOL is the normal hex 0D0A

      I have over 70K records to import from a larger CSV and I would dearly like to get the import to work

      as the speed of import is great. I have attached a similar CSV file if it would help.

    • #14621
      Ritesh
      Member

      Seems there is some problem with the attachment.

      Can you mail us the table structure and a sample CSV file so that we can work on it.

      You can mail them to [email protected]

    • #14622

      Thanks for the offer Ritesh, however, after scanning the MySQL Manual in the nine pages covering LOAD DATA INFILE Syntax, I changed my LINES TERMINATED BY 'n' to 'rn', set the fileds enclosed by ” Optionally and the imports of all my csv files worked perfectly.

      I have about 28 days to go on my trial, but I think you can count on a sale.

      Regards

      David

    • #14623
      Ritesh
      Member

      Great 😀

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