Assume a query that contains something like
set @x = max([column]) from [table]
insert into [table]
select * from [linkedserver].[database].dbo.[table] where [column]>@x
Is there an advantage to using OPENQUERY here instead of the 'direct' approach?
I'm running this on SQL Server 2016, data is being migrated from the linked server which is an old SQL Server 2005.
It works, I'm just wondering if it would be better to use OPENQUERY or not.