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

  • SEARCH
  • Home
  • 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 6694371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:05:38+00:00 2026-05-26T06:05:38+00:00

have problem with ampersand (&) How to search for the words (or sentences) that

  • 0

have problem with ampersand (&)

How to search for the words (or sentences) that contain an ampersand (&).

For example, in the database are:

1: "Johnson & Johnson"
2: "AT&T"
3: "Sample & Sample"

How should I write a full text search query to search for individual records?

SELECT * from Companies c WHERE CONTAINS(c.CompanyName, '"AT&T"')

I know that character (&) is responsible for the logical AND operation. But I do not know how to encode it to search in text with use full text search.

Any idea?

  • 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-05-26T06:05:39+00:00Added an answer on May 26, 2026 at 6:05 am

    Short version: You can’t (or at least you can, but you may get more results than you expected)

    Long version: The character '&' is treated as a “word breaker”, i.e. when SQL Server encounters an '&' it treats it as the start of a new “word” (i.e. token). What SQL Server Sees when parsing "AT&T" is two tokens, "AT" and "T".

    You can check this for yourself using sys.dm_fts_parser:

    SELECT * FROM sys.dm_fts_parser('AT&T', 1033, 0, 0)
    
    keyword     group_id    phrase_id   occurrence  special_term  display_term  expansion_type source_term
    ----------- ----------- ----------- ----------- ------------- ------------- -------------- -----------
    0x00610074  1           0           1           Noise Word    at            0              AT
    0x0074      2           0           1           Noise Word    t             0              T
    

    This means that search for "AT&T" is pretty much exactly the same as just searching for "AT T".

    This is by design, as far as I can see the only way to modify this behaviour would be to install your own word breaker, however this isn’t something that I would recommend doing.

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

Sidebar

Related Questions

I have a query string parameter value that contains an ampersand. For example, a
I have problem developing with live555. I already build the lib-files and example projects
Essentially my problem is thus; I have a MVC system that redirects all requests
I have problem with implementing Rich Text Editor (all that i tried, e.g. TinyMCE).
I have problem in my xampp server php file not work if I write
I have problem with Activities navigation, searching works good. Activities hierarchy looks like that:
I have problem with search location in Google Map Android here is my code
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
I have problem with my query on C, I’m using the oci8 driver. This
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are

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.