Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:40:01+00:00 2026-06-11T00:40:01+00:00

I have a site where I need to be able to search for data

  • 0

I have a site where I need to be able to search for data and have the query ignore all quotes.

  1. Search for don’t, don’t or dont and retrieve results for rows that have words that start with: don’t, don’t or dont
  2. Search for “hello” or “hello” or hello and retrieve results for rows that have words that start with: “hello”, “hello” or hello

Note: I already am stripping out the quotes for the passed in search term

I want to know if there is an easier (or less verbose) method than:

select Name 
  from tbl_MyTable
 where (Replace(Replace(Replace(Replace(Replace(Replace(Name,'“',''),'‘',''),'''',''),'"',''),'’',''),'”','') like 'dont%' 
    or Replace(Replace(Replace(Replace(Replace(Replace(Name,'“',''),'‘',''),'''',''),'"',''),'’',''),'”','') like '% dont%' );

Right now, my best idea is to create a new column that contains the quote-stripped version (prepended with a space) so that I can just do:

select Name 
  from tbl_MyTable
 where FixedName like '% dont%';

But I would really like to know if this can be accomplished without creating a new column and have it be efficient.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:40:02+00:00Added an answer on June 11, 2026 at 12:40 am

    Use a fulltext index instead of LIKE.

    Create your fulltext index:

    http://msdn.microsoft.com/en-us/library/ms187317.aspx

    CREATE UNIQUE INDEX ix1 ON tbl_MyTable(YourKey); //unique index required
    CREATE FULLTEXT CATALOG ft AS DEFAULT; // ft is your freetext catalog name
    CREATE FULLTEXT INDEX ON tbl_MyTable(Name) 
       KEY INDEX ix1
       WITH STOPLIST = SYSTEM; // this is your index and allows you to run the command below
    

    Then use this to run your query:

    SELECT Name 
    FROM tbl_MyTable 
    WHERE FREETEXT(Name, 'dont');
    

    That’s the fastest technique for this kind of thing. You can get even faster if you use third party free-text engines but there’s probably no need for that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a search box on my site and i need to replace all
Afternoon All, I have a web site where i need to know who is
I have a Drupal 7 site and need to output a small calendar control
I have a site using CF8 and Fusebox 5. Anytime I need to add
I need to check if the images people upload to my site have the
I currently have a web site hitting 7 Access DBs that I desperately need
I have items in a list in a SharePoint 2003 site that I need
I need to create a WP site which will have multiple subjects. Each subject
I have Solution with web site MyProject. I need publish this web site. In
I need to develop a site on Drupal 7. I have some content types

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.