Re: Using CASE statement in CONTAINS predicate ( For FullText Sear

Tech-Archive recommends: Fix windows errors by optimizing your registry



Vijay wrote on Tue, 23 Oct 2007 00:34:09 -0700:

Hi,

I donot want to use Multiple IF blocks as my IF criterias are huge...i
want to use some thing like

SELECT [ID] ,[Source] ,[Description],name
FROM [Search]
WHERE Source = CASE WHEN @allowSearchALL = 1 THEN Source ELSE 'mail'
END


You can't - Hilary was suggesting the only viable alternative, other than
creating dynamic SQL.

--
Dan


.