1、For Each dt1 As DataRow In DataTables("岗位执行操作维护表").SQLSelect("")
If dt1("表名") = "资源不准确整改清单表" And dt1("工作岗位") = "内线归档组" And dt1("执行类型") = "按钮【加载数据】1" Then
Dim str1 = dt1("列表项目1")
Dim nstr1 As String = " 系统编号 Is Null Or ( ( " '手工增加内容
For Each s1 As String In str1.split("/") '把查询到的内容按"/"进行分割
nstr1 &= " 工单类型 = '" & s1 & "' or " '把分割后的内容按 区域 = '' or 进行填写
Next
nstr1 = nstr1.substring(0, nstr1.length-3) & ") " '删除分割后内容的后面3个字符.并且增加符号")"
msgbox(nstr1)
End If
If dt1("表名") = "资源不准确整改清单表" And dt1("工作岗位") = "内线归档组" And dt1("执行类型") = "按钮【加载数据】2" Then
Dim str2 = dt1("列表项目1")
Dim nstr2 As String = "And ("
For Each s2 As String In str2.split("/")
nstr2 &= " 工单当前环节 = '" & s2 & "' or "
Next
nstr2 = nstr2.substring(0, nstr2.length-3) & "))"
msgbox(nstr2)
End If
Next
2、具体实例发上来测试