Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Access DB/2 via Transparent Gateway

Access DB/2 via Transparent Gateway

From: Bernd Hoeppner <b.hoeppner_at_abo.freiepresse.de>
Date: Wed, 27 Jan 1999 21:39:55 +0100
Message-ID: <36af792b.0@news.munich.netsurf.de>


I have to access data in a DB/2 database via Oracle Transparent Gateway from within PL/SQL (Oracle 7.3.4), means I 've to do inserts and updates.

These inserts and updates access 2 DB/2 tables like follows (in some PL/SQL procedures/packages)

    insert into db2_table_1

        (field_1, field_2, field_3)
        (select  field_1, plsql_variable, field_3 from db2_table_2)

I have to insert some values which are saved in PL/SQL-variables like plsql_variable.

Now Oracle doesn't evaluate plsql_variable, but parses it as is to DB/2, which cannot process it.

I have two solutions:

    for rec in (select... from db2_table_2) loop

        insert into db2_table_1 (...) values (rec.field_1...)
        ...

Both function fine, but I have to change a lot of code!

Does anyone know another solution????

Thanks
Bernd Hoeppner
hoeppner_at_ivm.com Received on Wed Jan 27 1999 - 14:39:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US