Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Posts
    19

    Unanswered: problem in transfer of data

    i have one table called admin_master consisting of numbers of data....


    another table called admin_master_old consisiitng of old data


    now i want to add this old data to exisiitng table admin_master without the loss of current data ,since data is huge how can i transfer data ...?

    is it possible with export /import command ?but there are chances i can loose my current data in admin_master....
    and, in admin_master one column is genrated always ,so it will be difficult to transfer data .....

    please tell me the solution if anyone here knows ..

    thank you

  2. #2
    Join Date
    Oct 2007
    Posts
    246
    you can use

    import from <filename>.del of del insert_update into admin_master

    kindly chk in test envi before doing in prod

    regds
    Paul

  3. #3
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    you could declare a cursor and execute load from cursor
    see infocenter for detailed command : load from cursor
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Code:
    INSERT INTO admin_master(...) SELECT ... FROM admin_master_old
    You may want to add a WHERE clause or use a cursor to iterate over the rows in chunks and do some intermediate commits. You should also specify the column lists so that you can handle the generated column, e.g. by omitting it.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367

  6. #6
    Join Date
    Aug 2009
    Posts
    19

    thanks to all guys

    yes now its working

    db2 cursor technique also working



    thanks db2girl

    the link contains nice info...

Posting Permissions

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