Hi,
I am trying the write a query which will include 2 columns from a table and an additional calculation which will be based on the 2 first columns. If the 2nd column is more than two times bigger than the first column, return he 2nd column multiplied by 2, otherwise, return the 2nd column multiplied by 1.5. Does anyone know how to do something like that?
select column1,column2, If (column1>column2*2) column2*2 else column2*1.5
from table 1
Regards,
Joe
I am trying the write a query which will include 2 columns from a table and an additional calculation which will be based on the 2 first columns. If the 2nd column is more than two times bigger than the first column, return he 2nd column multiplied by 2, otherwise, return the 2nd column multiplied by 1.5. Does anyone know how to do something like that?
select column1,column2, If (column1>column2*2) column2*2 else column2*1.5
from table 1
Regards,
Joe