sqlloader 倒数脚本

    技术2022-06-30  80

    echo "********************************************" echo "倒数脚本" echo "导入表为:hi.tb_test_input" echo "********************************************"                             echo "请先清空临时表数据 truncate table hi.tb_test_input; " echo "临时表清空了吗(Y/N)" read ans echo "请输入要上传的文件名称"   read name               #"*********把文本中的'M'替换成空格**********" //'  /jm_temp/BACKUP/$name>/jm_temp/BACKUP/input.txt echo "替换完成,详情请查看input.txt"    echo "loAD DATA INFILE /"/jm_temp/BACKUP/input.txt/" append into table hi.tb_test_input  fields terminated by /"/"  trailing nullcols                                 (         servnumber                                                                                                                            )">hdjr_20101206.ctl                                                            sqlldr userid=username/password@database control=hdjr_20101206.ctl data=/jm_temp/BACKUP/input.txt log=hdjr_20101206.log errors=0 direct=true

     

     

    --------------------------------------------------------------

    cat>test.ctl  loAD DATA INFILE "/jm_temp/kkk/test.txt"  truncate into table hi.tb_kkk_20101104_lodr  fields terminated by "|"  trailing nullcols  (                                       servnumber     "trim(:servnumber)"       ,slrq           "trim(:slrq)"       ,famc           "trim(:famc)"                                                                                                                                             )                               sqlldr userid=username/pwd@database control=test.ctl  data=/jm_temp/kkk/test.txt log=hdjr_20101206.log errors=0 direct=true

     

     

    cat>hdjr_20101206.ctl loAD DATA INFILE "/jm_temp/BACKUP/t.txt" append into table hi.tb_test_input  fields terminated by ""  trailing nullcols                  (      servnumber                                                                                                             )

     


    最新回复(0)