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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:21:02+00:00 2026-05-31T04:21:02+00:00

I realise that it would be a lot easier if I could modify the

  • 0

I realise that it would be a lot easier if I could modify the table when it was created, but assuming I can’t, I have a table that is such as:

abcd
abde
abdf
abff
bbsdf
bcggs
... snip large amount
zza

The values in the table are not fixed length.
I have a string to match such as abffagpokejfkjs .
If it was the other way round, I could do

SELECT * from table where value like 'abff%'

but I need to select the value that matches the start of a string that is provided.

Is there a quick way of doing that, or does it need an itteration through the table to find a match?

  • 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-31T04:21:03+00:00Added an answer on May 31, 2026 at 4:21 am

    Try this:

    SELECT col1, col2 -- etc...
    FROM your_table
    WHERE 'abffagpokejfkjs' LIKE CONCAT(value, '%')
    

    Note that this will not use an index effectively so it will be slow if you have a lot of records.

    Also note that some characters in value (e.g. %) may be interpreted by LIKE as having a special meaning, which may undesirable.

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

Sidebar

Related Questions

I realize that this can be a matter of preference, but I have noticed
I realise that you can open the google maps app ready for directions by
I realise that similar questions have been asked before however none of the solutions
I realise there might be similar questions but I couldn't find one that was
I realize that this question has been asked 100times but none that I have
I'm just starting to use sharepoint designer and realised there's a lot that can
I have realised that by using the Amazon S3 service directly, I can save
i want to realize a construct in MS SQL that would look like this
I realize that it can depend on certain things (and obviously how efficient the
(I realize that my title is poor. If after reading the question you have

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.