Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    24

    Thumbs up Unanswered: Querying multiple databases

    Hi All -

    I have two databases named SALES and REPORTS with tables populated with data.

    Tables in SALES database (SALES_REGION,SALES_AMOUNT)
    Tables in REPORTS database (REPORTS_REGION,REPORTS_AMOUNT)


    CONNECT TO SALES;
    INSERT INTO SALES.SALES_AMOUNT (SELECT * FROM
    REPORTS.REPORTS_AMOUNT);
    SELECT * FROM SALES.SALES_AMOUNT;

    How to achieve this?
    Thanks
    Laca


    FYI: We are not using (and restricted to use) any of the DB2 products like Data Joiner or Relational COneect etc.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Querying multiple databases

    I don't get what you mean by 'Restricted to use' ...

    You have to use Federated Databases here ...

    If both these databases are in DB2, then there is nothing additional to install .... You base installation supports Federated Databases ..

    Cheers

    Sathyaram



    Originally posted by dbtwodba
    Hi All -

    I have two databases named SALES and REPORTS with tables populated with data.

    Tables in SALES database (SALES_REGION,SALES_AMOUNT)
    Tables in REPORTS database (REPORTS_REGION,REPORTS_AMOUNT)


    CONNECT TO SALES;
    INSERT INTO SALES.SALES_AMOUNT (SELECT * FROM
    REPORTS.REPORTS_AMOUNT);
    SELECT * FROM SALES.SALES_AMOUNT;

    How to achieve this?
    Thanks
    Laca


    FYI: We are not using (and restricted to use) any of the DB2 products like Data Joiner or Relational COneect etc.

  3. #3
    Join Date
    Aug 2002
    Posts
    24

    Re: Querying multiple databases

    OK... if thats the only option..i should try that...thanks any how.
    Laca

  4. #4
    Join Date
    Feb 2002
    Posts
    96

    Thumbs up Re: Querying multiple databases

    Hi,

    By using 'Federated Database' you can not do insert/update/delete operation. It supports only SELECT operation.
    But DB2 V8 supports insert/update/delete/select operation.
    Hope it helps.

    Regards

Posting Permissions

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