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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:18:35+00:00 2026-05-16T07:18:35+00:00

I have basic stored procedure that performs a full text search against 3 columns

  • 0

I have basic stored procedure that performs a full text search against 3 columns in a table by passing in a @Keyword parameter. It works fine with one word but falls over when I try pass in more than one word. I’m not sure why. The error says:

Syntax error near ‘search item’ in the full-text search condition ‘this is a search item’

SELECT     S.[SeriesID], 
           S.[Name] as 'SeriesName',
           P.[PackageID],
           P.[Name]     
FROM       [Series] S
INNER JOIN [PackageSeries] PS ON S.[SeriesID] = PS.[PackageID]
INNER JOIN [Package]       P  ON PS.[PackageID] = P.[PackageID]
WHERE CONTAINS ((S.[Name],S.[Description], S.[Keywords]),@Keywords)
AND   (S.[IsActive] = 1) AND (P.[IsActive] = 1) 
ORDER BY [Name] ASC
  • 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-16T07:18:35+00:00Added an answer on May 16, 2026 at 7:18 am

    You will have to do some pre-processing on your @Keyword parameter before passing it into the SQL statement. SQL expects that keyword searches will be separated by boolean logic or surrounded in quotes. So, if you are searching for the phrase, it will have to be in quotes:

    SET @Keyword = '"this is a search item"'
    

    If you want to search for all the words then you’ll need something like

    SET @Keyword = '"this" AND "is" AND "a" AND "search" AND "item"'
    

    For more information, see the T-SQL CONTAINS syntax, looking in particular at the Examples section.

    As an additional note, be sure to replace the double-quote character (with a space) so you don’t mess up your full-text query. See this question for details on how to do that: SQL Server Full Text Search Escape Characters?

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I found the answer to this question. I will run… May 16, 2026 at 2:13 pm
  • Editorial Team
    Editorial Team added an answer You need to add a reference to the MySQL connector… May 16, 2026 at 2:13 pm
  • Editorial Team
    Editorial Team added an answer You can bind to a specific endpoint using the appropriate… May 16, 2026 at 2:13 pm

Trending Tags

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

Top Members

Related Questions

Inside of a stored procedure, I populate a table of items (#Items). Just basic
I have the following very basic stored procedure: CREATE PROCEDURE [dbo].[GetNumberToProcess] AS RETURN 999
I want to be able to have a Stored Procedure that can only be
I have a basic property bag table that stores attributes about my primary table
I have a basic GridView that displays a list of tasks to do (just
I have a task tracking application, which is very basic. It currently has a
I could really use some help optimizing a table on my website that is
I'm trying to build a basic application which will have 2 separate components which
I'm new to Clojure and have been using Compojure to write a basic web
I'm working on an application that is supposed to create products (like shipping insurance

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.