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

    Unanswered: Load data in Federated Table

    Hi,

    I'm using DB2 v8.1.1.40 and FixPak "4"

    When I try to insert data into Federated table using load cursor, it doesn't work .. but if I use select insert, it works fine.

    I'm running the following script (doesn't work) :

    create nickname ORFED01.TEST for db2base.ORTMP01.TEST;
    declare cpy_credit_data cursor for select * from ORDWTB.TEST;
    load client from cpy_credit_data of cursor replace into ORFED01.TEST statistics yes nonrecoverable;

    I'm getting the following error :
    SQL3015N An SQL error "" occurred during processing

    When I run the following script, it works :
    create nickname ORFED01.TEST for db2base.ORTMP01.TEST;
    insert into ORFED01.TEST select t.* from ORDWTB.TEST t

    I don't understand why it doesn't work with load cursor; as load cursor is much more faster than select insert, I need to use load cursor process to insert data into the table.

    Please let me know what you think.

    Thanks in advance,
    Mridul
    himridul

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Mridul, AFAIK, you cannot use LOAD to load data into a remote object ...

    LOAD is not SQL

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Why not try turning it around. Instead of federating from the source to the target, federate from the target to the source. Make a nickname for the source table on the target server, then use load from cursor by running it on the target server. I do not know if this will work, but it should be worth a try.

    Andy

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Andy, That will work ... I have used it successfully in the past ..

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Jan 2004
    Posts
    66
    Thanks to both of you for your valuable input. I know it would work if I do the stuffs in the trager server, but for this I had to open a new port instead of the existing opened port.
    himridul

Posting Permissions

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