kelin1314

http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/ldr_concepts.htm#SUTIL003

 

Below are the main steps of an example:

step 1: prepare the test table(you are recommend to make a sql file to store the ddl to create a table)

     create table SAMPLE
     (
        NAME INTEGER
     )

step 2: prepare data files and control file

     sample.dat:

         100001
     100002
     100003
     100004
     100005

   sample.bad:

       sample.ctrl:

           load data
    infile \'sample.dat\'
    badfile \'sample.bad\'
    append into
    table SAMPLE
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY \'"\' 
    (
     name
     )

step 3: at system prompt, enter into the directory in which the file above are put

    cd $ORACLE_HOME\RDBMS\demo

    run the following script(you can also type "sqlldr" to check the usage of the sqlldr):

    sqlldr userid=username/password control=sample.ctrl

 

and you will found data has been inserted into the table.

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-12
  • 2021-12-18
  • 2022-12-23
  • 2022-01-02
  • 2021-05-13
  • 2021-12-21
猜你喜欢
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案