Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    The Netherlands, Oudkarspel
    Posts
    27

    Unanswered: loading data with MySQL-Front

    Hi,

    I have some problems when I'm trying to import some data from a CSV file into a table.

    I'm using MySql 3.23.55 for Windows with MySQL-Front 2.4.

    I have a CSV file with 100 rows where the fields are separated with ',' en where the text is enclosed by '#'.

    When I give in MySQL-Front the command:

    LOAD DATA INFILE
    'C:/Documents and Settings/Gerard/Bureaublad/Joachim/MarktSelect_TestData_csv2/Porgcsv.csv'
    INTO TABLE test.org FIELDS TERMINATED BY ',' ENCLOSED BY '#' (LRRORG,LRRNM1,LRRNM2,LRRSTR,LRRHNR,LRRTHN,LRRPCD, LRRPLT,LRRSTRS,LPRPPN,LRRPPC,LRRPWP,LRRPNRS,LRRTEL ,LRRFAX,LREADR,LRRNAC,LRRNN1,LRRNN2,LRRNN3,LRRNN4, LRRNN5,LRRNN6,LRRNN7,LRRNN8,LRRNN9,LRRAOC,LRRAWR,L RRSTS,LRRKVK,LRRHNV,LRRSTN,LRRHN1,LRRHN2,LRRHN3,LR RRVC,LRRJAR,LRRPRC,LRRGMC,LRRCEB,LRREGG,LRRCOR,LRR KVD,LRRJARRK,LRRREC,LRROMZ,LRROMC,LRROKC,LRRFIL,LR BNC1,LRBNC2,LRBNC3,LRBNC4,LRBNC5,LRBNC6,LRROGI,LRR OGO,LRROGW,LRRECA,LRRIMP,LRREXP,LRWADR,LRROPH)

    there are only 51 of the 100 lines loaded into the table. When I check the data in the table I can see that only the lines 1,3,5,7,9,11 etcetera are loaded into the table while there are no empty rows between the data in my CSV file. So the lines 2,4,6,8,10,12 etcetera are skipped.

    Is there a way to load all the data into the table without putting emty rows between the data? In this file with 100 rows it is not mutch of a problem to add an 'enter' after eatch row but the next file I have to load has 1,4 million rows.

    I hope someone can help me.

    Joachim

  2. #2
    Join Date
    Jan 2003
    Location
    The Netherlands, Oudkarspel
    Posts
    27

    Re: loading data with MySQL-Front

    I just found out that it's possible to load all the data from a CSV file into a table with MySQL-Front. I just have to load the data twice. First I load the data from the rows 1,3,5,7,9,11,... and than I load the same file but I say to the program that it has to skip the firts row from the CSV. Now it is loading the rows 2,4,6,8,10,12,.... So I have al the data I want into the table but is this really the only way???

    Joachim

Posting Permissions

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