select * from table t where docode(t.jieshoukeshi,null,jieshoubinqu,jieshoukeshi)=????

解决方案 »

  1.   

    我想楼主可能是这个意思
    select docode(接收科室,null,接收病区,接收科室)
    from t_table  where 药品ID=?? and 出库单=??;
      

  2.   

    select * from chb 
       where (jsks='&a' and jsbq is null) or (jsks is null and jsbq='&a');  
      

  3.   

    select * from chb 
       where (jsks='&a' ) or 
       (jsks is null and jsbq='&a'); 
    没注意不好意思
      

  4.   

    SELECT DECODE(t.接收科室,null,t.接收病区,t.接收科室),SUM(T.零售金额) from t group by DECODE(t.接收科室,null,t.接收病区,t.接收科室)
      

  5.   

    SELECT DECODE(t.接收科室,null,t.接收病区,t.接收科室),SUM(T.零售金额) from t group by DECODE(t.接收科室,null,t.接收病区,t.接收科室)think you~  问题解决了
    也感谢各位的回答