My query(won't run):
SELECT * FROM TABLE A
WHERE (case when mode = 1 then Tonnage > 1000
when mode = 2 then Tonnage > 5000
else Tonnage < -1
)
What I am trying to do is to choose different filter critieria (tonnage) based on the other column (Mode).
However, this won't work due to the >
.
Is there a way to fix it?