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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:09:26+00:00 2026-06-06T18:09:26+00:00

Is there a way that this full-text searching query could be translated from MySQL

  • 0

Is there a way that this full-text searching query could be translated from MySQL into SQL Server?

SELECT *, MATCH(title) AGAINST('My Title' IN BOOLEAN MODE) AS score FROM books
WHERE MATCH(title) AGAINST('My Title' IN BOOLEAN MODE) ORDER BY score DESC,
books.title ASC

If it helps, I am specifically using SQL Server 2000. I don’t have the option of using a more recent version. :S

Here is a sample scenario.


Create the table:

--
-- Table structure for table `books`
--

CREATE TABLE IF NOT EXISTS `books` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `title` (`title`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ;

--
-- Index the title column
--

ALTER TABLE `books` ADD INDEX ( `title` )

--
-- Dumping data for table `books`
--

INSERT INTO `books` (`id`, `title`) VALUES
(1, 'My Title'),
(2, 'My Title'),
(3, 'Not My Title'),
(4, 'Other Title'),
(5, 'Not Related'),
(6, 'Not Related Either');

Execute the query:

SELECT *, MATCH(title) AGAINST('My Title' IN BOOLEAN MODE) AS score FROM books
WHERE MATCH(title) AGAINST('My Title' IN BOOLEAN MODE) ORDER BY score DESC,
books.title ASC

Here is what is returned:

id  title           score
1   My Title        1
2   My Title        1
3   Not My Title    1
4   Other Title     1

Thank you for your time.

  • 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-06T18:09:28+00:00Added an answer on June 6, 2026 at 6:09 pm

    This definitely sounds like a case for implementing Full-Text Search. It sounds like the algorithm you’re after is much more complex than those offered by CHARINDEX, PATINDEX and LIKE, which are very simple on/off type results (either the string contains the searched expression or it doesn’t).

    The official Microsoft documentation for Full-Text Search starts here. This article may also be useful, as well as this MSDN article, "Improve the performance of full-text indexing", and some of these Full-Text Search tips on mssqltips.com.

    The Full-Text keywords you’re probably most interested in are CONTAINS and CONTAINSTABLE. This page describes, among other things, how CONTAINSTABLE applies ranking.

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

Sidebar

Related Questions

I am new to SQL Server Full Text Searching, and am trying to figure
Is there a way to get the exact name of the object that this
Is there a way to make the UIPickerView read-only? This means that the user
Is there any way to refactor this code so that it can omit unnecessary
Is there some way when sending this message to specify that I rather have
Is there a way except the sshexec task to do this? I know that
I'm pretty sure there is an easier way to do this that I'm missing
There is this way, of course: OuterClass.this . But that's very clumsy. Ideally, there'd
Found this question that explained a way to communicate between layers. However there is
I am hoping that there might be an easy way to do this, I

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.