• These are puzzling:

    where [term]=@term and ([position]=@position) >=0

    and [value_per_month]=@value_per_month >=0

    Could you please explain what you're trying to accomplish? I just don't follow.

    [position] is a column in your table, and @position would be a variable/parameter.

    so say you have something like

    DECLARE @position INT = 10;

    SELECT ...

    FROM ...

    WHERE [position] = @position;

    would evaluate to

    SELECT ...

    FROM ...

    WHERE [position] = 10;

    what do you mean about @position>=0 ? Is that supposed to be part of an IF statement?