Sql两个字段做判断
case when (t.BKlockAmt > t.BKreceivableAmt) then
(t.BKreceivedAmt - BKlockAmt)
else
(
t.BKreceivedAmt - t.BKreceivableAmt
)
end as availableBlance
```
Sql两个字段做判断
case when (t.BKlockAmt > t.BKreceivableAmt) then
(t.BKreceivedAmt - BKlockAmt)
else
(
t.BKreceivedAmt - t.BKreceivableAmt
)
end as availableBlance
```