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

Import from multiple txt files

forums forums SQLyog Using SQLyog Import from multiple txt files

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #8113
      syrinx
      Member

      Hi, I have various txt files each one containing data for one table field, and I've trying to import separately each filed of a table, but the program adds the data at the end in every import. i. e.

      Code:
      field1.txt    field2.txt  
      john           male
      clara          female

      personstable
      name   sex
      john    
      clara
                 male
                 female

      I'm missing something or just can't do that?

      regards.

    • #14717
      CalEvans
      Member

      Pretty much you just can't do that. The import is basically a seriese of inserts, one for each record.

      YOur best bet is to use something like Excell to stitch the fields together into records, then save the final as a csv. Then try and import that.

      HTH,

      =C=

    • #14718
      syrinx
      Member

      Thanks for you reply Cal, but I found the solution. First, I switched to my Linux box (you know, there are more useful tools), then searched inside textutils package….and the command is

      $ paste -d , file1.txt file2.txt ….

      Regards.

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