SQL Server Developer Center > SQL Server Forums > SQL Server Search > Searching based on wildcard character
Ask a questionAsk a question
 

AnswerSearching based on wildcard character

  • Friday, October 30, 2009 2:54 AMKel Regor Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi, I would like to search a text based on a series of wildcard characters. For instance, if the user inputs the below search sequence, they should get the following outcome:

    Input: K*n
    Output: Ken

    Input: *e*
    Output: Ken, Gerald 

    I understand that by using full-text search's "contain" keyword, we can utilize the wildcard (*) character but the * has to be placed behind the search keyword. Therefore, I was wondering if the above is achievable. Thanks in advance.

Answers

  • Friday, October 30, 2009 9:11 AMHilary CotterMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No, you must use a like.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    • Marked As Answer byKel Regor Friday, October 30, 2009 12:42 PM
    •  

All Replies

  • Friday, October 30, 2009 9:11 AMHilary CotterMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No, you must use a like.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    • Marked As Answer byKel Regor Friday, October 30, 2009 12:42 PM
    •  
  • Friday, October 30, 2009 12:38 PMKel Regor Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ok, thanks.