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 6870837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:43:55+00:00 2026-05-27T03:43:55+00:00

Using the Sql Server 2008 how can you actually find an exact string match

  • 0

Using the Sql Server 2008 how can you actually find an exact string match using full-text search. I’m having a real hard time with this and I just couldn’t find a satisfactory solution anywhere online.

For example, if I’m searching for the string “Bojan Skrchevski” I want the first result to be exactly that.

So far I’ve tried formatting the string like: “Bojan* NEAR Skrchevski*” and call CONTAINSTABLE to get results, but this string is formatted to return more results as Bojana and Bojananana etc. I also tried to ORDER BY RANK, but still no success.

Furthermore, in my string I have a number sequence like: “3 1 7”, but with the current formatting it also returns “7 1 3” etc.

Example:

DECLARE @var varchar(4000);
SET @var = '"Oxford*" NEAR 24 NEAR 7 NEAR 5 NEAR "London*"'
SELECT [Key] FROM CONTAINSTABLE(dbo.[MyTable], [MyField], @var);

I want to be able to get the exact ordering. Not to get “Oxford 7 24 5 London” as a result.

How do I format the string to accomplish this correctly?

  • 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-27T03:43:56+00:00Added an answer on May 27, 2026 at 3:43 am

    Perhaps one approach could be to select several results with the full-text search and then SELECT the specific one from those results. But maybe there could be a better solution to this.

    I tried this approach and it actually worked. It also works a lot faster then to just SELECT the value.

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

Sidebar

Related Questions

I'm using SQL Server 2008 R2 and I can't seem to be able to
Hi i am using SQL Server 2008. How can I import an Excel file
I am using SQL Server 2008 in a Visual Basic 2010 application. I can
I am using sql server 2008 and my column is nvarchar(max). How can I
I am using SQL Server 2008, can you recommend me some tool that I
Using SQL Server 2008, is there a way to allow inserts to a table
I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd
I'm using SQL Server 2008 Management studio viewing a 2005 server and have just
I'm using SQL Server 2008. My database is almost 2GB in size. 90% of
I'm using SQL Server 2008 and I would like to use a sproc to

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.