想查询出参数LX 为A的时候条件为 AA IN ('1') AND BB IN ('6') 的 SUM(A.AED) 的综合 SELECT CASE WHEN '${LX}'='A' AND AA IN ('1') AND BB IN ('6') THEN SUM(A.AED) WHEN '${LX}'!='A' AND AA IN ('1','2') THEN SUM(A.AED) END AS "cs" FROM A 这样写对吗 |
最佳回答 |
||||
0
|
|