我们如何根据接近值的条件匹配列。这需要复杂查询/范围比较/多连接条件。获取查询大小超过 2GB 错误。
表:
InvDetails1 / InvDetails2 / INVDL / ExpectedResult
领域关系:
InvDetails1.F1 = InDetails2.F3
InvDetails2.F5 = INVDL.F1
INVDL.DLID = ExpectedResult.DLID
ExpectedResult.Total - 1 < InvDetails1.F6 < ExpectedResult.Total + 1
left(InvDetails1.F21,10) = '2013-03-07'
返回来自 ExpectedResult 的记录数仅为 1 的结果。
Group by InvDetails1.F1 , count(ExpectedResult.DLID) works.
从这个结果。
最后结果 :
InvDetails1.F1 , InvDetails1.F16 , ExpectedResult.DLID , ExpectedResult.NMR
ExpectedResult - has millions of rows.
InvDetails - few hundred thousands