Frage im Vorstellungsgespräch bei SCAN Health Plan

How to remove duplicate records

Antworten zu Vorstellungsgespräch

Anonym

25. Juli 2015

Use CTE.

1

Anonym

28. Jan. 2016

or to clarify duplicates into a staging table when you are taking a subset of all the fields and you know what specific fields you are after, INSERT INTO > (>) SELECT > FROM (>) GROUP BY > having count(*)>1 and to add only those that are not duplicates INSERT INTO > (>) SELECT > FROM >) T GROUP BY > having count(*)=1