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

The Archive Base Latest Questions

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

I am doing a ALPHABETICAL ORDER SEARCH module for a project. that is it

  • 0

I am doing a “ALPHABETICAL ORDER SEARCH” module for a project.

that is it will look like

A B C D E F . . . . . . . . . .. . . . . . . .. . . . Z

When i click on “A” the results should be sort by “A“. Which is same for all the alphabets.

Now my prob is as follows:

  • For example there is a film named “The Mummy“.

  • What i do is when click on the “ALPHABET T” this corresponding film will be sort.

  • But my client requirement is that “The Mummy” movie must sort when the user clicks on “M” and not “T”

  • Because “a, an, the” are “ARTICLES” and it does not have any meanings.

I hope now that everybody can understood what my problem is….

Any help will be appreciable and thankful.

thanks in advance

  • 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-13T22:05:33+00:00Added an answer on May 13, 2026 at 10:05 pm

    Assuming that you do not wish to modify the content of the table (and hence get slightly less efficient queries), the following should do the trick.
    (If you do have the leisure of modifying the table, see the suggestions at the end of this answer)

    SELECT Title
    FROM myTable
    WHERE (Title LIKE 'x%' OR Title LIKE 'THE x%')
      -- AND Title NOT LIKE 'THE [^T]%'   
    ORDER BY Title
    

    Notes:
    – x designate the desired letter (example: LIKE ‘A%’ etc.)
    – The “AND TITLE NOT LIKE” extra condition is only needed when “X” is the letter “T” (it is otherwise functionally redundant, but doesn’t change the result)
    – I’m unsure of the support of the the [^xyz] (i.e. NOT characters x, y or z), so the [^T] could be replaced by its positive equivalent say [A-RS-Z0-9].

    There are a few other stop words to consider (“A”, “AN”, “OF”…) but for book or film titles, it is a common practice to only consider “THE”. If you must deal with the other articles, the logic can be extended as in:

    SELECT Title
    FROM myTable
    WHERE (Title LIKE 'x%' 
        OR Title LIKE 'THE x%' 
        OR Title LIKE 'A x%' 
        OR Title LIKE 'AN x%') 
     -- the following is only needed when "x" is either the letter T or A.
     -- AND (Title NOT LIKE 'THE [^T]%' 
     --      AND Title NOT LIKE 'A [^A]%' 
     --      AND Title NOT LIKE 'AN [^A]%'
     --  )
    ORDER BY Title
    


    There are better solutions, if you can modify the table’s contents. Some of these imply pre-computing one or several extra columns (and maintaining it/these, when new records are added etc.).

    • See for example Cletus’ answer in this post for the “sort_column” approach, where the extra column contains the title stripped of any undesirable leading noise-word. In addition to its purpose as the filtering field in the initial letter search problem of the OP, this column can also be used to sort, in a more friendly/sensible way, lists of titles which were produced by a filter unrelated to the initial letter and/or the begining of the title (say a search by year).
    • A variation on the above is to only store the “effective” initial letter (the one past the undesired noise), making for a smaller column, but a less versatile one too.
    • The title column itself can be updated, storing a modified form of the title, whereby the extraneous leading noise-word(s) is moved to the end of the string, between parenthesis. This practice is quite common with bibliographic-type catalogs.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I'm doing Project Euler #22: Using names.txt (right click and 'Save Link/Target As...'), a
I have a result from an SQL query that I would like to sort
Is the xml that is created from your DataContract created in alphabetical order. I
I want a SQL like query and have results that start with the input
I'm trying to sort an NSMutableArray of Strings into alphabetical order and display the
Doing a mysqli query and COUNTing the results, is there a preferred comparison operator
Doing code analysis of the project and get the message Reference-counted object is used
I have a ruby array that looks something like this: my_array = ['mushroom', 'beef',
I would like to sort a file on more fields. A sample tab separated

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.