Based on your sample data (thanks) see a different method.
select * from @table2 t2 where not exists (select * from @table1 t1 where t1.link=t2.link)
Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting: Large scale of database and data cleansing
Remote DBA Services: Improves MS SQL Database Performance
SQL Server Integration Services: Business Intelligence
No comments:
Post a Comment