Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我被问到一件很奇怪的事情,尽管我猜这很简单。从 Excel 文件中删除唯一行,只保留重复项。有没有简单的方法可以做到这一点?所有选项都非常受欢迎,例如将 excel 文件加载到 Sql-Server 并对其应用选择!!!提前很多 M.
此 sql 查询仅返回重复的行
select column1, column2, column3, ... from Table1 group by column1, column2, column3, ... having count(*) > 1
假设 A2 到 A11 中的数据,在 B2 中输入并复制下来:
=COUNTIF($A$2:$A$11,A2)=1
然后将 B 列过滤为 TRUE 并删除这些行。