SQLTeam.com | Weblogs | Forums

FullText Search with Condition?


#1

Hi,

i'm trying a fullsearch as followed:

USE [DB_TEST]
GO
DECLARE @SearchExpression NVARCHAR(30)
SET @SearchExpression = '1200mm'
EXEC (
'SELECT [No_], [Description], [Description 2], [Search Description], [Vendor Item No_]
FROM [dbo].[TESTVERSION 23_08$Item]
WHERE CONTAINS(*, ''"' + @SearchExpression + '*"'')')
GO

What query i need if i want something like:

From Columns A,B,C, D select rows where exist wood and 1200mm

We have now a query where the Users put in as SearchDescription wood*12mm, this give as result all rows where have wood and 1200mm inside the field , but now i would search this expression inside various fields , how can i do this ?

Thanks