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 -> Re: remote database and cursor

Re: remote database and cursor

From: <krichine_at_juno.com>
Date: 25 Sep 2006 17:39:13 -0700
Message-ID: <1159231153.176771.185960@i3g2000cwc.googlegroups.com>


Unless you have heavy logic in the body of your loop that can not be coded in SQL, then simply do:

insert into local_table select *

                        from
                                triton.mytable_at_PDCDB r
                        where
                                col1 = 'A';

If you do have some logic in the body, try coding it using SQL. SQL is almost always better than PL/SQL.

Even if your logic is so complex that you can not do it in a single SQL statement, I would consider pulling (as little as possible) data across in one statement into a local table, then doing that complex processing locally.

Kirill Received on Mon Sep 25 2006 - 19:39:13 CDT

Original text of this message

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