Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006

    Unanswered: Newbie: How to pass data from database to other database

    Hi guys im new in the informix world, i need to pass data from a table X in database A, to a table Y in database B, the fields are not equal so i need to do an insert (fields...) values(..)
    i thought in write a stored procedure but i don't have a manual to learn (is difficult to find informix manuals ), how can i pass this data using just a SQL query or stored procedure?

    can you give me a little sample?


  2. #2
    Join Date
    Nov 2004

    You can access the tables of other database with the following syntax:

    select * from database_remote:table_remote

    I gues, you can now easily write a SQL.



  3. #3
    Join Date
    Apr 2004
    IBM store all manuals online :

    If your second database is on the same databaseserver you can use :
    insert into table1 (col1, .. ) select col2,.. from db2:tab2 ;

    If your second database is on another databaseserver (same or other hosts) you can use :
    insert into table (col1, ..) select col2,.. from db2@server2:tab2 ;
    and be sure your server2 is also referenced in the SQLhosts file your pointing at.

    Another way is to unload from a specific select statement with : unload to 'file1' select col1, .. from tab1;
    Move the file and reload them on the second database :
    load from 'file' insert into tab2.

    Yves & Willy

Posting Permissions

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