本帖最后由 huahuagongzi9999 于 2012-03-27 15:24:00 编辑

解决方案 »

  1.   

    是这样的么  传值就查询  空值就相当于1=1
    --字段COL1、2、3 参数a b c
    select * 
    from T_TSG_REVIEWHIS 
    where REVIEWER='DEPT_BMLD_BSTA' and col1=a and (col2=b or b is null) and (col3=c or c is null)
      

  2.   


    相当于 REVIEWER 这个参数是拼出来的
      

  3.   

    还是不大了解多个传值 要怎么取?  如果传值是 1  1,2  3,4
    那就是相当于这个? 应该也不对吧?select * from T_TSG_REVIEWHIS where REVIEWER='1_1_3'
    union all
    select * from T_TSG_REVIEWHIS where REVIEWER='1_2_4';