Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problems With Quotes using CONTAINS Freetext

Author  Topic 

Velnias
Yak Posting Veteran

58 Posts

Posted - 2010-05-07 : 06:03:10
So I have

ALTER PROCEDURE [dbo].[spGetSubmissionBySearch]
(
@searchString nvarchar(1024) = default
)
AS
BEGIN
SET NOCOUNT OFF;

SELECT ProductID, SubmitterID, ProductName, ProductTextDescription, Manufactuer, Importer, ProductRevisionStatusID, ProductClassificationID, FormatID,
TargetPopulationID, Dosage, Nutrient_Expression, NutritionalHealthClaim, ProductLabel, ProductPromotionalMaterial, Comment, SubmissionDate,
sysSubmissionDate, ProductRevisionID, OtherProductClassification, OtherFormat, OtherTargetPopulation, statusID, ManufacturerAddress1, ManufacturerAddress2,
ManufacturerAddress3, ImporterAddress1, ImporterAddress2, ImporterAddress3, ManufacturerAddress4, ImporterAddress4, ManufacturerCountry, ImporterCountry,
isRevision, revisionID, ProductLabel2, ProductLabel3, ProductLabel4, ProductLabel5, ProductLabel6, MISClassificationID
FROM tblProducts
WHERE (statusID = 1) AND CONTAINS(*,@searchString)
ORDER BY SubmissionDate DESC

END

And it works fine if I enter something like 'Cat'

But how can i enter something like '"Cat"' or '"*Cat*"'
Thanks
   

- Advertisement -