什么会导致模糊查找从引用表中返回一组 Null 值?
我正在对表的视图进行模糊查找,该表可以很好地返回相似性,但偶尔会出现异常,但我似乎无法弄清楚是什么导致了问题。 有时,比较会从查找视图中得出空值,即使这些值同时存在于视图和原始表中,并且我为“精确”匹配选择的列在查找视图和原始表中都具有相同的值。源 SQL。
关于为什么它提取空值有什么想法吗?
替代文本 http://img689.imageshack.us/img689/4846/fuzzylkp.jpg< /a>
I'm doing a fuzzy lookup on a view of a table which does a fine job returning similarities with the occasional exception, and I can't seem to figure out what is causing the problem.
Every so often, the comparison will come up with null values from the lookup view, even though the values exist in both the view and the original table and the columns I have selected for "exact" match have identical values in both the lookup view and the source SQL.
Any thoughts as to why it's pulling null values?
alt text http://img689.imageshack.us/img689/4846/fuzzylkp.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现通过更改列的顺序并将精确匹配项放在列表顶部,可以正确返回空结果。
I discovered that by changing the order of the columns, and placing the exact matches at the top of the list, the null results were returned properly.
在高级设置中更改 MinSimilarity 阈值 - 请参阅此文章,还有标题 运行时会发生什么:
简而言之,这意味着如果您将其设置得太高,您可能根本得不到任何匹配。我怀疑这就是导致 NULL 值的原因,因为即使将其设置为 1.0,也不可能仅在这种情况下所有值都为 NULL,我也对此表示怀疑,因为这不会是模糊的,而是精确匹配。
Change your MinSimilarity threshold in the advanced settings - See this article, and there the heading What Happens at Run Time:
That means in short, if you set it too high, you might not get any matches at all. I doubt that this is what leads to your NULL values since it is unlikely that all of the values are NULL only by this condition, even if it were set to 1.0, which I doubt as well since that would not be fuzzy but exact matching.
这可能是“IT Crowd”电视剧中的内容:您是否尝试过将其关闭然后再次打开?
对于 SSIS,这不仅仅意味着再次打开 Visual Studio,而是围绕查找重新构建每个框 - 以及查找框本身,即使它占用了您的时间 - 以便您删除而不仅仅是刷新它们。
请参阅如何避免将匹配列值之一中包含 NULL 的行传递给 KingswaySoft SSIS 插件中不匹配的行工具“高级查找”? - DBA SE 只能像这样修复。令人惊讶的是,元数据在每一步都是正确的,许多盒子已经被再次替换,没有显示错误,但仍然必须整体重新构建。
This might be something from the "IT Crowd" TV series: have you tried turning it off and on again?
For SSIS, that would not just mean to open Visual Studio again, but to re-build each box around the lookup - and also the lookup box itself even if it eats up your time - so that you delete and not just refresh them.
See How do I avoid passing a row with a NULL in one of the matching column values to the unmatched rows in KingswaySoft SSIS Add-In tool "Premium Lookup"? - DBA SE which could be fixed only like this. Astonishingly, the metadata was right at every step, many boxes were already replaced again, no error shown, and still, it had to be re-built as a whole.