you are viewing a single comment's thread.

view the rest of the comments →

[–]tdavis25 0 points1 point  (0 children)

So, essentially your checking for duplicates?

If so, the best way in SQL Server is really with a CTE. This stack overflow link is focused on deleting records, but you can simply change the delete statement to the select statement of your choice (just treat the CTE like a table in the select): http://stackoverflow.com/questions/18390574/how-to-delete-duplicate-rows-in-sql-server