Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014
    Posts
    6

    Question Unanswered: Load data local infile

    Hi,

    I have a raw file like below,
    20131008 02:30:00,9165,0003,0,
    20131008 02:31:00,9232,0023,1,
    20131008 02:32:00,9243,0013,2,

    It has a lot of white spaces after each and every row.

    Is there a way to ignore those white spaces while loading the data ?

    or do I have to mention it like

    LINES TERMINATED BY ', \n'

    Thanks in advance for your help !

  2. #2
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    You could remove the blank lines first, example:Remove empty lines with sed

    Or tell "load data" to only include certain lines, example: https://coderwall.com/p/0nnaiq

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •