What is wrong with the following delete statement? I am trying to delete rows from a table on a linked server that exist in a table of the same name on the local server. The following is from query analyzer.
I have tried many variations of the above without success. The only thing tricky is that the tables are named the same on the remote and local servers requiring the use of an alias. What am I missing?
I have an insert statement which follows the delete which inserts rows to the remote table from the local tables referenced in the delete statement. The insert works without a problem.
TIA
Mark
Code:
DELETE t_remote
FROM SERVER.DATABASE.dbo.WEB_EOB t_remote
WHERE EXISTS (SELECT eob_pk FROM web_eob t_local WHERE t_local.eob_pk = t_remote.eob_pk)
================
[red]Server: Msg 7306, Level 16, State 2, Line 23[/red]
Could not open table '"DATABASE"."dbo"."WEB_EOB"' from OLE DB provider 'SQLOLEDB'. The provider could not support a row lookup position. The provider indicates that conflicts occurred with other properties or requirements.
[OLE/DB provider returned message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]
I have tried many variations of the above without success. The only thing tricky is that the tables are named the same on the remote and local servers requiring the use of an alias. What am I missing?
I have an insert statement which follows the delete which inserts rows to the remote table from the local tables referenced in the delete statement. The insert works without a problem.
TIA
Mark