'how to remove duplicate records?
I want to import excel sheet data to sql database.In database there are already have records, i want to import another records from excel and want remove duplicate records.
how can I do it
1st Table
2nd Table
I want to import 2 tables to 1 table and remove duplicate records
Solution 1:[1]
I'm not sure what your data looks like but this is how I would do it.
Load your new dataset into a different table. Query your newly imported table Left join your new data table Filter for nulls on the old table (only select records that are NOT in old table) Change this to an append query with "INTO X" line. Drop the staging table.
OR you could import them both and if they are the same format you can just Union them. Select * FROM Table A UNION Select * From Table B and that will remove dupes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | case42 |
