• Hi Teri,

    Let me try to clarify...

    On a typical select query I would have:

    select [term],[position],[value_per_month]

    from [dbo].[XXXX]

    where [term] like ='%something%' and [position] >0 and [value_per_month] >0

    so what I wanted to do i put this simple query into a stored procedure, where I can use the stored procedure as filters, per se.

    Thus, when Adam mentioned, 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, so how else can i re-write stored procedure where

    create procedure spFT

    @term nvarchar (250),

    @position int,

    @value_per_month int

    as

    Begin

    select [term],[position],[value_per_month]

    from [dbo].[XXXX]

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

    and [value_per_month]=@value_per_month >0

    End

    How else can i re-write stored procedure that when i execute it, the bold below, i can simply modify and change its value.

    spSomeSP @term='%some%thing%', @position>0