Sequences

oracle United States
  • 17 years ago

    How do I get a sequence to work when loading data via sql loader?


    My current ctl file looks like this:


    LOAD DATA
    INFILE 'S:\Sop\Dev\EcsData.csv'
    BADFILE 'S:\Sop\DevEcs
    Data.bad'
    DISCARDFILE 'S:\Sop\Dev\Ecs_Data.dsc'


    APPEND
    INTO TABLE TEST
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (SEQID,
    DATE
    SENT,
    TIMESENT,
    BUYER
    NAME)


    Seq_id is the field I want to use the sequence.


    Thanks.

  • 17 years ago

    A sequence is supplied by Oracle, it isn't a changeable value. You cant just specify what you want the sequence to be. you need to set up the sequence then grab nextval from dual. If you dont understand this then I suggest you read a book before messing with them, because they are quite difficult things to maintain.


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”