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
 General SQL Server Forums
 New to SQL Server Programming
 FREETEXT with blank parameter in where condition.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2013-03-05 : 07:24:09
Dear All,

I trying following query for searching the record from multiple tables. Some time in where condition all parameter is not passed.
It's a search that's why all parameter are optional. Any one parameter can pass may be all also.

When I am using FREETEXT I am getting error "Null or empty full-text predicate".

Can anyone please help me how to give the condition or what I have to pass if parameter i optional ?

Query:
SELECT * FROM [Product] PRD
INNER JOIN [ProductVariant] PRDV ON PRD.Id = PRDV.ProductId
INNER JOIN [Product_Manufacturer_Mapping] PRDMAP ON PRDMAP.ProductId = PRD.Id
INNER JOIN [Manufacturer] MNF ON MNF.Id = PRDMAP.ManufacturerId
WHERE
FREETEXT(MNF.Name,'harish')
AND FREETEXT(PRD.Name,'')
AND FREETEXT(PRD.MetaKeywords,'')
AND PRDV.Price BETWEEN 0 AND 0

Thanks and Regard's
Harish Patil
   

- Advertisement -