M
Mike Fellows
Im not really a big user of MS Access so please bear with me
I have a field which contains a numerical value (ColumnX)
In a new column in the query i need to take the value of ColumnX and if the
value is less than 1000
i need to put 30% of ColumnX into the new column
if its greater than 1000 and less than 2000
i need to put 40% of ColumnX into the new column
anc finally if its greater than 2000
i need to put 50% of ColumnX into the new column
i.e.
if columnX <=1000 then
newColumn = ColumnX*0.3
else if ColumnX >1000 and <= 2000 then
newColumn = ColumnX*0.4
else if ColumnX >2000 then
newColumn = ColumnX*0.5
endif
I have no idea how to do the above in a query, Ive looked about on the web
and I am unable to find anything to do with If statements
for Querys if anyone could help with this it would be greatly appreciated
Mike Fellows
I have a field which contains a numerical value (ColumnX)
In a new column in the query i need to take the value of ColumnX and if the
value is less than 1000
i need to put 30% of ColumnX into the new column
if its greater than 1000 and less than 2000
i need to put 40% of ColumnX into the new column
anc finally if its greater than 2000
i need to put 50% of ColumnX into the new column
i.e.
if columnX <=1000 then
newColumn = ColumnX*0.3
else if ColumnX >1000 and <= 2000 then
newColumn = ColumnX*0.4
else if ColumnX >2000 then
newColumn = ColumnX*0.5
endif
I have no idea how to do the above in a query, Ive looked about on the web
and I am unable to find anything to do with If statements
for Querys if anyone could help with this it would be greatly appreciated
Mike Fellows