January 29, 2013 at 9:40 am
Dear,
I have two servers Server1 & Server2. Server1 is using SQL 2008 R2 64 bit and Server2 is using Oracle 11g 64 bit. I configured linked server from SQL to Oracle using Oracle Provider for OLE DB.
Now I want to write an insert command that will fetch information from Table1 which is on Server1 and store into View1 which is on Server2.
So I have to insert data into a view named View1. Please tell me how to insert into a view in Oracle.
Please help me, urgently needed.
January 29, 2013 at 9:57 am
assuming the Oracle view is updatable because it has no aggregates or calculated columns, it's exactly the same as any other insert.
if it's not, you have to insert into the underlying tables themselves.
DECLARE @Criteria int = 42
INSERT INTO MyOracle..Username.TableName(ColumnList)
SELECT MyAlias.ColumnList
FROM
MySQLServer.DatabaseName.SchemaName.TableName MyAlias
WHERE MyAlias.Criteria = @Criteria
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply