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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:47:02+00:00 2026-05-10T18:47:02+00:00

I need to add the ability for users of my software to select records

  • 0

I need to add the ability for users of my software to select records by character ranges.
How can I write a query that returns all widgets from a table whose name falls in the range Ba-Bi for example?

Currently I’m using greater than and less than operators, so the above example would become:

select * from widget where name >= 'ba' and name < 'bj' 

Notice how I have ‘incremented’ the last character of the upper bound from i to j so that ‘bike’ would not be left out.

Is there a generic way to find the next character after a given character based on the field’s collation or would it be safer to create a second condition?

select * from widget where name >= 'ba' and (name < 'bi' or name like 'bi%') 

My application needs to support localization. How sensitive is this kind of query to different character sets?

I also need to support both MSSQL and Oracle. What are my options for ensuring that character casing is ignored no matter what language appears in the data?

  • 1 1 Answer
  • 1 View
  • 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-10T18:47:03+00:00Added an answer on May 10, 2026 at 6:47 pm

    Let’s skip directly to localization. Would you say ‘aa’ >= ‘ba’ ? Probably not, but that is where it sorts in Sweden. Also, you simply can’t assume that you can ignore casing in any language. Casing is explicitly language-dependent, with the most common example being Turkish: uppercase i is İ. Lowercase I is ı.

    Now, your SQL DB defines the result of <, == etc by a ‘collation order’. This is definitely language specific. So, you should explicitly control this, for every query. A Turkish collation order will put those i’s where they belong (in Turkish). You can’t rely on the default collation.

    As for the ‘increment part’, don’t bother. Stick to >= and <=.

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

Sidebar

Related Questions

Interesting dilemma here. I need the ability for users to add links from their
I have a large ability file that decides what exactly users can do by
I need the ability for users to add, edit, and delete lists/libraries but not
I can't access a element with its href. Like this example, i need add
I have a web application where users can add recommendations , post comments etc
I need (if its possible) to add an ability to my project to be
Hi I'm making my own ToDo program, and I need to add the ability
I want to add the ability for the users to capture the current screen
All, I am creating a web application and I need to give users the
I need to add ability to call certain number/account in my iOS app. But

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.