I'm sure Tim Bunce will have a more definitive answer, but one way to
get around this is to create a synonym for the [EMAIL PROTECTED] table.

i.e. create synonym foo_remote for [EMAIL PROTECTED]; 

and then you can run your sql as such:

insert into foo_remote
        select * from foo
        where condition='bar';

-Joe

--- "Chen, Allen" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've searched all over and can't seem to find an answer to this... 
> I have
> perl code using DBI and DBD::Oracle where I'm trying to selectively
> copy
> rows from one table to another table on a remote database via an
> Oracle
> database link.  The SQL is pretty simple and basically looks like
> the
> following: 
> 
>   insert into [EMAIL PROTECTED]
>        select * from foo
>         where condition='bar';
> 
> What seems to be happening is that DBI (or DBD::Oracle?) is
> ignoring the
> @remote so that it ends up inserting rows back into itself.  The
> very same
> query works correctly from sqlplus.  Does DBI/DBD::Oracle support
> database
> links?  Am I just doing something wrong? 
> 
> I'm using perl 5.8.0, DBI 1.35, and DBD::Oracle 1.13.
> 
> Any help would be greatly appreciated (and may help prevent further
> hair
> loss).
> 
> Thanks much,
> -Allen

Reply via email to