当前位置: 代码迷 >> PB >> 关于find函数的用法?该如何处理
  详细解决方案

关于find函数的用法?该如何处理

热度:84   发布时间:2016-04-29 05:33:37.0
关于find函数的用法?
dw_1.find("sxhh = '"+ls_sxhh+"'",1,dw_1.rowcount()) 

以上是可以执行的语法 现在想多个条件 查询 hwxx.zidan 
加入以下语句  该如何处理
 "  charindex(',' + :ls_sxhh + ',' , ',' + Hwxx.zidan + ',') > 0 "

dw_1.find("sxhh = '"+ls_sxhh+"' or charindex(',' + :ls_sxhh + ',' , ',' + Hwxx.zidan + ',') > 0 ",1,dw_1.rowcount())

------解决方案--------------------
可以 
messagebox('', "sxhh = '"+ls_sxhh+"' or charindex(',' + :ls_sxhh + ',' , ',' + Hwxx.zidan + ',') > 0 ")
看看它查找的字符串表达式对不对。
------解决方案--------------------
dw_1.find("(sxhh = '"+ls_sxhh+"') or pos(',' + :ls_sxhh + ',' , ',' + Hwxx.zidan + ',') > 0 ",1,dw_1.rowcount())
  相关解决方案