哦,是的,MS Access...
我有一个包含重复项的表,基本上如果有重复项,我需要删除两条记录。这可能吗?
使事情复杂化的是,我所说的“重复”并不是在所有字段中都真正重复,而是跨关键字段。
这是表格(格式不是很漂亮):
ID documentDate accountNetAmount reference accountTaxAmount getBankAccount getCompany isReconciled oid
11 6/30/2013 20687.7 REFTe 0 02537.0000000014 02544.0000000023 1 02364.0000000078
12 6/30/2013 -20687.7 EFTe 0 02537.0000000014 02544.0000000023 0 02364.0000000079
13 6/30/2013 14935.41 REFTf 0 02537.0000000014 02544.0000000023 1 02364.0000000080
14 6/30/2013 -14935.41 EFTf 0 02537.0000000014 02544.0000000023 0 02364.0000000081
15 7/4/2013 -294.55 MIMOSA -29.45 02537.0000000014 02544.0000000023 0 02364.0000000177
16 7/8/2013 -1185.81 BPAY080713 -118.58 02537.0000000014 02544.0000000023 0 02364.0000000499
17 7/9/2013 -462.05 PERFUME -46.2 02537.0000000014 02544.0000000023 0 02364.0000000179
18 7/9/2013 -1264.09 PERFUMERY -126.41 02537.0000000014 02544.0000000023 0 02364.0000000181
我需要删除 documentDate 和 abs(accountNetAmount) 相同的记录。所以我的结果集应该是这样的:
ID documentDate accountNetAmount reference accountTaxAmount getBankAccount getCompany isReconciled oid
15 7/4/2013 -294.55 MIMOSA -29.45 02537.0000000014 02544.0000000023 0 02364.0000000177
16 7/8/2013 -1185.81 BPAY080713 -118.58 02537.0000000014 02544.0000000023 0 02364.0000000499
17 7/9/2013 -462.05 PERFUME -46.2 02537.0000000014 02544.0000000023 0 02364.0000000179
18 7/9/2013 -1264.09 PERFUMERY -126.41 02537.0000000014 02544.0000000023 0 02364.0000000181
有什么建议么?别忘了,MS Access……呃。
谢谢!