DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to read a file

  1. #1
    Join Date
    Jun 2002
    Posts
    10
    I have a file stored somewhere (let's say under D:/oracle/bin). This file contains some records separated by a delimiter.
    Let's say the file contains:
    11|name1|a
    22|name2|b
    33|name3|c

    I want to read the file get the values and insert it into a table where I have three columns namely id, name and code.

  2. #2
    Join Date
    Dec 2000
    Posts
    126
    use SQL LOADER. this is sample


    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '/d:\oracle\bin\file_name.txt'
    READBUFFERS 4
    TRUNCATE
    INTO TABLE table_name
    REENABLE DISABLED_CONSTRAINTS
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
    ( fld_1 INTEGER EXTERNAL
    , fld_2 CHAR
    , fld_3 CHAR
    )

  3. #3
    Join Date
    Jun 2002
    Posts
    10
    Thank You Culonbu

Posting Permissions

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


Click Here to Expand Forum to Full Width