case when

CASE WHEN (t.payWay =10 OR t.payWay =11) AND t.payStatus=1  THEN CAST(tod.totalPrice AS DECIMAL(10,2)) CASE WHEN (t.payWay =10 OR t.payWay =11) AND t.payStatus=0 THEN   ELSE CAST((tod.totalPrice-(tod.totalPrice *0.01)-tod.totalFee) AS DECIMAL(10,2)) END AS netDue

你可能感兴趣的:(case when)