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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:27:29+00:00 2026-05-10T13:27:29+00:00

I have lots of article store in MS SQL server 2005 database in a

  • 0

I have lots of article store in MS SQL server 2005 database in a table called Articles-

'Articles (ArticleID, ArticleTitle, ArticleContent)' 

Now I want some SP or SQL query which could return me similar Article against any user’s input (very much like ‘Similar Posts’ in blogs OR ‘Related Questions’ in stackoverflow). The matching should work on both ArticleTitle and ArticleContent. The query should be intelligent enough to sort the result on the basis on their relevancy.

Is it possible to do this in MS SQL Server 2005?

  • 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. 2026-05-10T13:27:30+00:00Added an answer on May 10, 2026 at 1:27 pm

    Something like this might work, a kind of ranking system. You would probably have to split the string in your application to build a SQL string, but I have used similar to build an effective site search.

    Select Top 10 ArticleID, ArticleTitle, ArticleContent From Articles Order By (Case When ArticleTitle = 'Article Title' Then 1 Else 0 End) Desc, (Case When ArticleTitle = 'Article' Then 1 Else 0 End) Desc, (Case When ArticleTitle = 'Title' Then 1 Else 0 End) Desc, (Case When Soundex('Article Title') = Soundex(ArticleTitle) Then 1 Else 0 End) Desc, (Case When Soundex('Article') = Soundex(ArticleTitle) Then 1 Else 0 End) Desc, (Case When Soundex('Title') = Soundex(ArticleTitle) Then 1 Else 0 End) Desc, (Case When PatIndex('%Article%Title%', ArticleTitle) > 0 Then 1 Else 0 End) Desc, (Case When PatIndex('%Article%', ArticleTitle) > 0 Then 1 Else 0 End) Desc, (Case When PatIndex('%Title%', ArticleTitle) > 0 Then 1 Else 0 End) Desc, (Case When PatIndex('%Article%Title%', ArticleContent) > 0 Then 1 Else 0 End) Desc, (Case When PatIndex('%Article%', ArticleContent) > 0 Then 1 Else 0 End) Desc, (Case When PatIndex('%Title%', ArticleContent) > 0 Then 1 Else 0 End) Desc 

    You can then add/remove case statements from the order by clause to improve the list based on your data.

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

Sidebar

Ask A Question

Stats

  • Questions 157k
  • Answers 157k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check the reason code associated with your SQL0913N to determine… May 12, 2026 at 11:08 am
  • Editorial Team
    Editorial Team added an answer An attribute called "notes" is added dynamically to nodes when… May 12, 2026 at 11:08 am
  • Editorial Team
    Editorial Team added an answer You could use the console commands >>>import os >>>os.system("java -version")… May 12, 2026 at 11:08 am

Related Questions

For a database assignment I have to model a system for a school. Part
I've long had a desire for an STLish container that I could place into
I have an application that was developed for Linux x86 32 bits. There are
I have a ray, I need to find the closest line segment that it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.