Suppose you're updating a table that is the result of an expression, like so
UPDATE OPENQUERY( server, 'SELECT a from b' )
SET rem.a = loc.a
FROM OPENQUERY( server, 'SELECT a from b' ) rem
,local_table loc
WHERE rem.id = loc.id
Will that OPENQUERY be executed once, or twice? I believe the same would apply to any kind of updatable query expression.
Also, is there any way for me to alias it so that it does not need to be repeated?