如何使用sqlloader导入多个.txt或.csv格式的数据表?如果可以,表的格式和*.crl文件该如何编写?

解决方案 »

  1.   

    when导入到多张表时,一定要用position,不能用terminated
    Load data
    infile "F:\tmp\pp.txt"
    replace
    into table P_cc_tb
    when wtype='1'
    fields terminated by '|'
    trailing nullcols
    (
    wtype filler,
    aa,
    ...
    )into table P_FW_NStandTime_Transact
    when wtype='2'
    fields terminated by '|'
    trailing nullcols
    (
    wtype filler,
    bb,
    ...
    )