-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Vijay_s_666
Message 1 in Discussion

Hi,    I am using Microsoft FullText search feature in my database for 
Searching strings.   I want to use CASE statement in CONTAINS.  
DECLARE @allowSearchALL int 
SELECT [ID] ,[Source] ,[Description],name  
FROM [Search] 
WHERE CONTAINS( Source , '"mail"') 
i know we can use CASE in WHERE clause...but dono how to use CONTAINS with 
CASE. 
My Requirement is  
if @allowSearchALL  is 1 then get all records otherwise use specified hardcoded 
text "mail" 
I have to use CONTAINS. 
I would like use some thing like this, 
SELECT [ID] ,[Source] ,[Description],name  
FROM [Search] 
WHERE Source = CASE WHEN @allowSearchALL  = 1 THEN Source ELSE 'mail' END 
This way i can map column name to same column name if @allowSearchALL  = 1 . 
How this can be done in CONTAINS ? like WHERE CONTAINS(source, CASE ...ELSE 
...END) 
Please give me solution for this. 
Thanks in advance 
vijay 
  
  
  
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to