以文本方式查看主题 - 易表在线答疑 (http://egrid2000.com/dvbbs/index.asp) -- 用户社区 (http://egrid2000.com/dvbbs/list.asp?boardid=2) ---- [求助]如何匹配地址码? (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=24613) |
||||
-- 作者:denkun2000 -- 发布时间:2013/3/18 9:59:00 -- [求助]如何匹配地址码? 地址码如何根据地址匹配现有辖区建筑物得出村社区代码(地址码和村社区代码是一样的
),最少两个中文字匹配,如果少于两个中文字就不显示? |
||||
-- 作者:dancedy -- 发布时间:2013/3/18 11:27:00 -- 匹配的规则是什么 |
||||
-- 作者:denkun2000 -- 发布时间:2013/3/18 12:06:00 -- 就是地址包含现有建筑物两个中文文字就可以了, |
||||
-- 作者:wjq1072 -- 发布时间:2013/3/18 12:51:00 -- 不理解!
|
||||
-- 作者:wjq1072 -- 发布时间:2013/3/18 19:48:00 -- 参考:地址包含现有建筑物前两个中文文字是可以的!
|
||||
-- 作者:wjq1072 -- 发布时间:2013/3/18 22:15:00 -- 参考:地址包含“现有建筑物”(限制四个中文字符)中连续两个中文文字,可用刷新公式:
If(Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",0,4),[地址])>-1 And Len(Mid("""),"#",""",0,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",0,4)),If(Instr(Mid(""")+""",0,4))"+","""""+Rept(")",[%A%])) <> "",Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",0,4),[地址])>-1 And Len(Mid("""),"#",""",0,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",0,4)),If(Instr(Mid(""")+""",0,4))"+","""""+Rept(")",[%A%])),If(Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",2,4),[地址])>-1 And Len(Mid("""),"#",""",2,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",2,4)),If(Instr(Mid(""")+""",2,4))"+","""""+Rept(")",[%A%])) <> "",Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",2,4),[地址])>-1 And Len(Mid("""),"#",""",2,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",2,4)),If(Instr(Mid(""")+""",2,4))"+","""""+Rept(")",[%A%])),If(Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",4,4),[地址])>-1 And Len(Mid("""),"#",""",4,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",4,4)),If(Instr(Mid(""")+""",4,4))"+","""""+Rept(")",[%A%])) <> "",Eval("If(Instr(Mid("""+Substitute(Substitute(Substitute(Eval("Substitute(""|@|#|"",""|"","""+Substitute(ListFor("表1","现有辖区建筑物",2),"|",""")+""|""+Substitute(""|@|#|"",""|"",""")+""")"),"@",""",4,4),[地址])>-1 And Len(Mid("""),"#",""",4,4))=4,FindText(""表1"",""村社区代码"",""现有辖区建筑物"",""Instr"",Mid("""),"|",""",4,4)),If(Instr(Mid(""")+""",4,4))"+","""""+Rept(")",[%A%])),"")))
其中表达式变量[%A%]:Aggregate(4,1,3,Rows,3,1) |
||||
-- 作者:denkun2000 -- 发布时间:2013/3/18 22:58:00 -- 非常感谢!! |