实现变量的左匹配
if (select count(spid) from sphwph where spid=变量 and pihao like 变量)>'0'要达到的目的:if (select count(spid) from sphwph where spid=变量 and pihao like 变量%)>'0'

解决方案 »

  1.   

    ?什么意思
      
    if (select count(spid) from sphwph where spid=变量 and pihao like '变量%')>0
      

  2.   

    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+'%')>'0'
      

  3.   

    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+'%')>0
      

  4.   

    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+'%')>'0'
      

  5.   

    if (select count(spid) from sphwph where spid=变量 and pihao like 变量%)>'0'
    pihao like 变量%
    如果变量为22
    那么223,2233等都可以出现
      

  6.   

    我这样写
    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+‘%’)>'0'if (select count(spid) from sphwph where spid=变量 and pihao like 变量+%)>'0'
    %都不会显示
      

  7.   

    我这样写
    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+‘%’)>'0'if (select count(spid) from sphwph where spid=变量 and pihao like 变量+%)>'0'
    %都不会显示
    ------------------------------
    if (select count(spid) from sphwph where spid=变量 and pihao like 变量+'[%]')>0
    这样就可以了
    终于看明白lz的要求了
       真另人头痛的表达能力啊