Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
[code]select *from (select BatchGuid from #TempTable1 group by BatchGuid having count(*) = 1) u inner join #TempTable1 t on u.BatchGuid = t.BatchGuid[/code]KH[spoiler]Time is always against us[/spoiler]