FORMSOF and variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerrycan
    New Member
    • Apr 2007
    • 1

    FORMSOF and variable

    Hi All

    I have the following SQL script:
    ALTER procedure FREESEARCH1
    @SVALUE as nvarchar(255)
    as
    declare @rc int

    if @SVALUE like '*' exec dbo.ALLREQ else
    Select * from Requirements where
    contains (*, 'FORMSOF (INFLECTIONAL,' +@SVALUE+')') and Deleted>0


    GO
    SET QUOTED_IDENTIFI ER OFF
    GO
    SET ANSI_NULLS ON
    GO

    During runtime the @SVALUE is always seen as null and never returns any records.
    How Can this be done?

    Thanks

    Jarrod Williams
Working...