Loading fixed-width, space delimited .txt file into mySQL

前端 未结 2 1040
旧时难觅i
旧时难觅i 2020-12-17 00:43

I have a .txt file that has a bunch of formatted data in it that looks like the following:

...
   1     75175.18     95128.46
   1    790890.89    795829.16
         


        
2条回答
  •  再見小時候
    2020-12-17 01:18

        LOAD DATA
    CHARACTERSET AL32UTF8
    INFILE 'DCF Master 14APR2013 VSPCFM_reduced size.txt'
    INTO TABLE EMPLOYEE3
    (
    a = TRIM(SUBSTR(@row,1,11)),
    b = TRIM(SUBSTR(@row,33,38)),
    c = TRIM(SUBSTR(@row,70,86))
    )
    

提交回复
热议问题