Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
DECLARE @FORMSOF as varchar(1000) DECLARE @Phrase as varchar(1000) SET @FORMSOF = 'FORMSOF (INFLECTIONAL, "' + @SearchText + '")' SET @PHRASE = '"' + @SearchText + '"'; WITH Products AS ( SELECT ID, [Name], Sku, Origin, Price, ROW_NUMBER() over (ORDER BY ID) AS 'RowNumber' FROM mytable P WHERE P.Active = 1 and ( CONTAINS(Name, @FORMSOF) --Search for forms of input text in product name OR CONTAINS(Detail, @FORMSOF) -- Search for forms of input text in product description OR CONTAINS(Origin, @PHRASE) -- Search for input text in Origin field OR SKU Like '%' + @SearchText + '%' -- Search for input text in Sku field ) ) SELECT * FROM Products
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.