SELECT *
FROM mytable
WHERE @num<1 AND mytable.a>@num
@num is the parameter for your external number.
Since I failed to fully understand both conditions, you may need to adjust above statement, but the main point is to have an "AND" in the WHERE clause.