各位老师,写select语句的时候想根据某个字段给返回的数字加上正负号大概要怎么写?类似select volume if (direction='LONG') else -volume这样?
用iif,例如
select iif(direction=='LONG', volume, -volume) from t