Below statement will return values from OpenQuery(MYSQL).
Select * From OpenQuery(MYSQL, 'Select * From ResearchRpt') a
Where Not Exists (Select * From dbo.ResearchRpt where Id_report = a.Id_report)
I want to reversed it where the result values should be came dbo.ResearchRpt
Thank.
Your query uses an anti-join. An anti-join can be implemented with
LEFT JOIN+WHERE IS NULLjust as well as withNOT EXISTS. So, convert your script to the LEFT JOIN version, swap the sides, and you are done: