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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:32:13+00:00 2026-05-23T02:32:13+00:00

I am developing a search system… A user enters the following search: project managers

  • 0

I am developing a search system…

A user enters the following search: “project managers finance”

We have a table with tags…

tbl_tags with the following items (phrases) in the table:

ID   Tag
 1   Project Managers
 2   Programme Managers
 3   Finance
 4   Finance Managers

I want to split the search phrase and pull results that have only are exactly matched in the database. E.g. ID’s 1 and 3 (not 2 and 4)

What is the best way to go about this as a SQL query?

My current method is very long winded and involves producing all results for each word in the query e.g. Contains(tag,"project OR manager OR finance"), producing all results for that then comparing each produced tag using instr(query,oRS("Tag")).

I have full text enabled so can use contains if necessary.

  • 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-23T02:32:13+00:00Added an answer on May 23, 2026 at 2:32 am

    I have just found a solution for this problem, using CHARINDEX to compare the CONTAINS results to a string.

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

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

Sidebar

Related Questions

I'm developing a back-end application for a search system. The search system copies files
I have a search form in an app I'm currently developing, and I would
I am developing web application where users have collection of tags. I need to
Developing search utility to search a file entire computer system, works fine on windows
I'm developing Sharepoint Search with own Content Source. And I have my crawl properties
I have a web-based documentation searching/viewing system that I'm developing for a client. Part
I'm developing a shop system and got problems with the search. Searching for articles
I am developing an mobile application that search the user's location via GPS and
I am developing a faceted search system. Below the search box, there's a radio
Im currently developing an webapplication that are going to have an Autocomplete search form,

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.