error during update openquery
-
Hello, I have 2 SQL servers (MS SQL and ORACLE). I an running an update openquery (from MS SQL) in order to update a table from Oracle. My select from openquery is not based on a simple select from one table; it is using few inner joins among tables from both servers. When I am runnig the update I receive the following error: ROW-00009: Cannot update row in a read-only rowset ] As far as i read on the net, I saw that there is not possible because of too complex code. Does anyone have any idea if there exists any workaround for this? Thanks a lot.
-
Hello, I have 2 SQL servers (MS SQL and ORACLE). I an running an update openquery (from MS SQL) in order to update a table from Oracle. My select from openquery is not based on a simple select from one table; it is using few inner joins among tables from both servers. When I am runnig the update I receive the following error: ROW-00009: Cannot update row in a read-only rowset ] As far as i read on the net, I saw that there is not possible because of too complex code. Does anyone have any idea if there exists any workaround for this? Thanks a lot.
mikcutu wrote:
My select from openquery is not based on a simple select from one table; it is using few inner joins among tables from both servers.
How about doing those inner joins, and put the result in a temporary table? That way you'd have a "simple" table to update. That way you'd also see whether the error is in the query itself, or during the update.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
mikcutu wrote:
My select from openquery is not based on a simple select from one table; it is using few inner joins among tables from both servers.
How about doing those inner joins, and put the result in a temporary table? That way you'd have a "simple" table to update. That way you'd also see whether the error is in the query itself, or during the update.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
Hello Eddy, Thanks for reply me. In the end, my update should be in a final table and this means to have also a join between the final table and the temporary one but this makes me thinking to try using a view for entire join selection and use it into the openquery. I will try this and let you know. Cheers, Mikcutu.