If pDotCount = 0 Then sqlString = "select t.需要分割的字段,t.cname from 表名 t where Instr(t.icsn, '.', 1, 1)=0" Else sqlString = "select t.需要分割的字段,t.cname from 表名 t where Instr(t.icsn, '.', 1," & pDotCount & ")>0 and Instr(t.icsn, '.', 1, " & (pDotCount + 1) & ")=0 and Instr(t.icsn,'" & pParent & "',1,1)=1" End If