访问脚本以查找两个表之间的类似匹配 [英] Access Script to Find Similar matches between two tables

查看:54
本文介绍了访问脚本以查找两个表之间的类似匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个来自外部公司的文件,我将每月收到两次。当文件进来时,我必须将他们的文件与内部文件进行比较并找到匹配项。我知道如何通过连接两个表来找到完全匹配,但我需要确定两个确切的
和类似的匹配。

I have a file from an outside company which I will receive twice a month. When the file comes in I have to compare their file to an internal file and find matches. I know how to find exact matches by joining two tables, but I need to identify both exact and similar matches.

每个文件都有一个策略编号,但是他们的文件可能有中间的空格,添加一个扩展/前缀,以防止完全匹配。如何识别表1中保单编号中至少5个字符与表2中
策略编号匹配的实例?保单号码由字母和数字组成,可能包含句号,连字符甚至斜线。

Each file has a policy number, however their file may have a space in the middle, add an extension/prefix which would prevent an exact match. How can identify instances where a minimum of 5 characters within the policy number from table 1 match the policy number on table 2? The policy numbers will consist of letters and numbers and may have periods, hyphens or even slashes.

Lorac1969

Lorac1969

推荐答案

1.当你在Access中查询时,使用左功能LEFT(OldTable.Policy,5)= LEFT(Newtable.Policy,5)



2.有很多方法可以清理数据,其中一种方法是在加载前使用SSIS包清理/验证。
1.While You are querying in Access, Use the left funtion LEFT(OldTable.Policy,5)=LEFT(Newtable.Policy,5)

2.There are many ways to cleansing the data, One of the ways is to use the SSIS packages to clean/Validate before load.


这篇关于访问脚本以查找两个表之间的类似匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆