var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Changing a Positive Number to Negative
I have a table that has a column with a numerical values in, and another column that denotes whether the numerical value is positive or negative.
The column with the number in is always positive.
The other column has 2 values:
P = Positive (for payment)
R = Negative (refund)
How can I get a query to show the numerical number as a negative if the other column has an "R" in it?...and also have it shown as a numerical value?
Many thanks in advanced
Originally Posted by IronEagleUK
Iif(PosNegCol = 'R', NumberCol *-1, NumberCol)
CDbl(SWITCH(PosNegCol = 'R',"-") & NumberCol)
ur codings are working excelent.