• Adam Angelini (6/30/2015)


    You can only use = to assign values to variables. If you need to filter on >=0, you need to put that logic in the body of your stored procedure.

    what adam mean is that when you assign the value to the parameters of stored procedure you can only use '='.

    exec SomeSp @param = '%FT%', @Quantity = 0

    now, how you want to use it in a query inside a SP, well it depends what you have in mind.

    following is very confusing to understand what actually you are looking for. please explain a bit more in detail about below

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

    and [value_per_month]=@value_per_month >=0

    it even more helpful if you share some sample data and your desired output which will help a lot to understand the actual problem.

    hope it helps.