Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    66

    Exclamation Unanswered: problem in sequence generator using SqlLoader

    Hi all,

    problem in sequence generator using SqlLoader in ORACLE 9i :

    I've 2 input files and these two files will be loaded into a single table using 2 parallel sessions simultaneously. Now in this case , if each table has 100 records , the sequence of the table becomes 1 to 100 and then for second file again 1 to 100 . but it should be 1 to 200 . Can I set the RECNUM function to a specific value , so that it starts from a specific no , such as from 101.

    eg,
    sqlldr scott/tiger@xxx direct=true parallel=true ctl=first.ctl

    sqlldr scott/tiger@xxx direct=true parallel=true ctl=second.ctl

    --first.ctl
    LOAD DATA
    INFILE 'c:\mr.txt'
    APPEND
    INTO TABLE BDAY
    fields terminated by "-"
    (REC_NUM RECNUM,NAME ,EMPNO)

    --second.ctl
    LOAD DATA
    INFILE 'c:\mr1.txt'
    APPEND
    INTO TABLE BDAY
    fields terminated by "-"
    (REC_NUM RECNUM,NAME ,EMPNO)

    These commands are running parallely in different sessions.
    I need rows in BDAY table with sequence no 1 to 200. Not 1 to 100 and 1 to 100 .

    It's also possible that I don't know the no. of input records in the flat files.In that case what will be the solution to get proper sequnce no.?

    Plz help me , Thanks in advance ......
    himridul

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: problem in sequence generator using SqlLoader

    Look at using the SQL Loader COUNT or MAX parameters instead of RECNUM:

    http://download-west.oracle.com/docs...06.htm#1008321

Posting Permissions

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