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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:49:31+00:00 2026-06-03T00:49:31+00:00

I need to match on a partial string but can’t turn full-text indexing on

  • 0

I need to match on a partial string but can’t turn full-text indexing on so can’t use contains. I’ve looked at Levenstein’s function for determining the distance between two strings but I’m not looking for fuzzy matching but that every character in the column exists in the string.

I.e. If the string being passed is something like AB_SYS_20120430.TXT I want to match on any columns containing AB_SYS. The like predicate isn’t getting me there. I really need the equivalent of the .NET contains feature but as mentioned turning on full text indexing isn’t an option to be turned on. Thought I would see if there were any other possible work arounds.

  • 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-03T00:49:32+00:00Added an answer on June 3, 2026 at 12:49 am

    Are you looking for the LIKE function?
    http://www.w3schools.com/sql/sql_like.asp

    ... WHERE MyColumn LIKE '%AB_SYS%'
    

    That may not be optimal, but it seems like it answers your question… If you can search from only the left or right side that could further optimize.

    That is functionally similar to String.Contains
    http://msdn.microsoft.com/en-us/library/dy85x1sa.aspx

    EDIT: How will you parse the input text into the “relevant” substring?

    EDIT: To search the same LIKE condition but reverse, from your partial column to the complete literal, simply append the wildcard characters:

    ... WHERE 'AB_SYS_20120430.TXT' LIKE '%' + MyColumn + '%'
    

    EDIT: You have suggested that you can’t get it to work. If you add the schema do your question then I can help you further but consider this:

    You have a table called MyTable
    In that table there is a column called MyColumn
    Some rows in that table have the data ‘AB_SYS’ in MyColumn

    Given the parameter ‘AB_SYS_20120430.TXT’ you want to return all matching rows

    CREATE PROCEDURE MyTestProcedure 
        @pFullNameString nvarchar(4000) = '' -- parameter passed in, like AB_SYS_20120430.TXT
    AS
    BEGIN
        SELECT
            *
        FROM
            MyTable
        WHERE
            @pFullNameString LIKE '%' + MyTable.[MyColumn] + '%'
    END
    GO
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to match an alphanumeric word. It can contain - but not at
I need to match the last integer in a string and capture possible elements
I need to match the abcd in text which may contain: abcd ssss ffff
I need to match a string like 2431-72367 , i.e., a string with at
I have any text in C#, and I need match using Regular Expressions, and
I need to match a string holiding html using a regex to pull out
I need to remove any instances of 544 full-text stopwords from a user-entered search
I need to search for a partial match in an inverted index, following code
I need to match this and extract the value from these tags. Problem is
I need to match contents of a list with a given pattern, and 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.