Are you using a single-quoted or double-quoted string? Remember that Perl will evaluate arrays in double-quoted strings, so it is likely that is happening... do you not have strict vars turned on or have a variable named @remote?
DBD::Oracle uses OCI calls directly (just as SQL*Plus does) and definitely supports database links since it really doesn't do that much manipulation of the query... about the only thing it does to the SQL is replaces Perl-syntax bind variables (?) with :1, :2, etc., before handing it off to Oracle to process. # Chris ----- Original Message ----- From: "Chen, Allen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 5:55 PM Subject: DBD::Oracle with Database Links? > 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 > >
