Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    36

    Angry Unanswered: identity column sugeestions---urgetn

    DB2 V 8.1 FP5
    OS . SOL

    I have lot of tables which are having identity columns .

    They are of type GENERATED BY DEFAULT AS IDENTITY(STARTS with)

    How do i load data into these kind of tables.
    Right now , i am using the following load statements to load the data.

    load from scheam.tabname.ixf of ixf MESSAGES tabname.messages insert into schema.tabname;

    Is that right form of load statemetn for table has identity columns. I haven't seen any errors so far. But is there a chance getting duplicate data

  2. #2
    Join Date
    Apr 2004
    Posts
    36
    Any update???

  3. #3
    Join Date
    Jul 2004
    Posts
    76

    Re: identity column sugeestions

    As it is identity column, so it will always generate new value for each new record. If your table don't have any previous data and you haven't reset the value of identity column then there is no chance of error while loading the data.

  4. #4
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    you need to ignore identity columns , user identityignore option while loading.


    here is sample

    load from tst.ixf of ixf moddified by identityignore replace inot tablename;



    This will work , let me know , if any questions


    Thank You


    Lekharaju Ennam

  5. #5
    Join Date
    Apr 2004
    Posts
    36
    Hi fam,

    I guess the load statements works fine.
    But i used a regular load statement with out identity ignore .
    some thing like this.

    "load from tst.ixf of ixf insert into tablename"

    It just worked fine with identity column table also . No complaints.
    I have been doing this for some time .
    Is this a some thing new feature in V8.

    And other thing i have observed is , even if i re run the same load statement with same syntax , it is just working fine with out complaints.
    It is deleting the existing rows and inserting the new rows , even if i don't use the replace option.

    since i am moving the stuff to production ,i want to stick to right syntax.

Posting Permissions

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