I am trying to write stored proc that gives me duplicates. The way it is written now is something like:
select * from table1 where entereddate between getdate()-100 and getdate()
I put that into a table variable (tmptable1), then do another query.
Select * from table2
join table2 on
table2.indexid <> table1.indexid and
name = name and client= client.
What I would like to see is all the duplicates of table one regardless of when they were entered. So, in other words: Start with the entered date to pull the potentially duplicated fields, then look at all the data and pull out those dates without regard to entered.
Does that make sense, and can anyone help?
select * from table1 where entereddate between getdate()-100 and getdate()
I put that into a table variable (tmptable1), then do another query.
Select * from table2
join table2 on
table2.indexid <> table1.indexid and
name = name and client= client.
What I would like to see is all the duplicates of table one regardless of when they were entered. So, in other words: Start with the entered date to pull the potentially duplicated fields, then look at all the data and pull out those dates without regard to entered.
Does that make sense, and can anyone help?