Posted by Maury on 07/25/06 10:36
Hello,
I have a stored procedure that deletes duplicates
in one table:
.....
AS
BEGIN
DELETE FROM mytable
WHERE Id IN(
SELECT Max(id)
from mytable
group by date, idsens
having count(*) >1
)
END
sometimes it happens that I have >2 rows with duplicated values.
How can I write a new stored procedure that delete all rows with
duplicated infomrations (leaving only one row with those values)?
Thanks
M.A.
[Back to original message]
|