Hello everyone.

I am trying to do a SQL query on a sales table with different sales types.

Sales type S is SALE, M is EXCHANGE, R is RETURN, K is ROUNDING.

Return and Rounding are both negative value in database.

I would only like to convert sales type 'K' to positive value.

I read about using ABS function but i am not able to get it to work.

Something like

Select

ABS(amount) where Salestype='K' as Rounding, amount where Salestype='S' as Sale,

amount where Salestype='R' as Return, amount where Salestype='M' as Exchange

from Retailtable