I'm working with SQL Server Express, I created a linked server to an Oracle database.
As the title indicates, I want to insert data selected from a local table into a table at the Linked Server.
I tried many queries but no one of them worked as I want.
This query below I used has worked, but only with static values, but I want to insert data dynamically from the a table on local database.
INSERT OPENQUERY (ORTEST, 'SELECT * FROM reservation')
VALUES (2, '2', 3);
Correct syntax
INSERT OPENQUERY(sql_server, 'SELECT a1,a2,a3 FROM database.schema.table_a') (a1, a2, a3)
SELECT b1, b2, b3 FROM database.schema.table_b;