[英]Compare two tables in MS Access SQL query
I have two Excel tables (A and B) with names of staff. 我有两个带有工作人员姓名的Excel表(A和B)。 I want to compare these two tables in MS Access. 我想在MS Access中比较这两个表。
I have an Access query which compares a field like [Lastname, Firstname] and gave me as result for every member of Table A with no equivalent member in Table B . 我有一个Access查询其中字段进行比较,例如[姓氏,名字]和给我作为结果与在表B中没有等效部件表A的每一个成员。 In my SQL query, Access made a simple string compare. 在我的SQL查询中,Access进行了一个简单的字符串比较。 For example: 例如:
SELECT User.A, User.B
WHERE User.A Is Null
The problem is that the name with umlauten (ä,ü,ö,ß) are not written synchron in both tables. 问题在于,在两个表中都没有同步写入带有umlauten(ä,ü,ö,ß)的名称。 Sometimes I have ä or ae, ü or ue etc. Can I use regex in Access SQL to solve this problem? 有时我有ä或ae,ü或ue等。可以在Access SQL中使用正则表达式来解决此问题吗?
Thanks for helping. 感谢您的帮助。
The approach I would take is to translate the names into a standardized format, in a derived column in both table A and B. Then you can use this column for a simple string comparison. 我将采用的方法是将名称转换为表A和B的派生列中的标准化格式。然后,您可以使用此列进行简单的字符串比较。
The translation can be accomplished using the replace
function in Access. 可以使用Access中的replace
功能来完成翻译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.