I'm building a UI where user will have an option of entering different comparison operations such as >,<,>=,<=.
I need to reflect it in my query, so the WHERE
clause in my query will look like this:
declare @number int
declare @operand varchar(2) = '>' --can be >, <, >=, <=
.....
WHERE amount` + operand + `@number`
.....
So, resulting piece would be WHERE amount > @number