Linked server openquery for insert into oracle

Hi

I am doing insert openquery through linked server
Is it possible to use openquery to insert record into oracle table of one schema from joining between oracle table only but from different schema.

like
insert into (lnk_ora, 'insert into oracle schema1.table(col1, col2)
select column_1, column_2 from oracle schema2.table')

T.I.A

I don't think you can do that.

I'm not sure if this will work, but I suggest trying:

EXEC('insert into oracle schema1.table(col1, col2) select column_1, column_2 from oracle schema2.table;’) AT [lnk_ora];

I believe the closing semi-colon is significant in Oracle (or at least it used to be).

Thank you! It worked!!

Great! And thanks for confirming back to me that it did indeed work: I knew it should, but sometimes computers see things differently than people :grin: