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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:08:01+00:00 2026-06-15T21:08:01+00:00

I am writing an android application in which i have to get a range

  • 0

I am writing an android application in which i have to get a range of values like the below,

I have a DB in which the contents are like the below 5 columns,

_ID | _NAME | _AGE | _HEIGHT | _WEIGHT |

1   | aabv  | 10   | 5.0     | 30

1   | babs  | 10   | 5.1     | 28

1   | cabg  | 10   | 5.2     | 29

1   | dabs  | 10   | 5.3     | 32

1   | eaba  | 10   | 5.0     | 31

1   | gabe  | 10   | 5.0     | 31

1   | iabr  | 10   | 5.0     | 31

1   | xabt  | 10   | 5.0     | 31

1   | zabu  | 10   | 5.0     | 31

now i would like to extract the rows which are ‘d’ to ‘s’ =>
output should => dabs, eaba, gabe, iabr

Can i do it so? if so what is the sql query.

I tried the below –
“request the name which are in between D and S”

mCursor = mDb.query(DATABASE_NAME, new String[] { _ID, _NAME, _AGE, _HEIGHT, _WEIGHT }, 
                _NAME + " BETWEEN " + "D" + " AND " + "S", 
                null,
                null, 
                null, 
                _NAME + " ASC");

Its giving an error saying there is an error in the statement =>

_NAME + " BETWEEN " + "A" + " AND " + "S"

Kindly help.

[1/11] Q: In the above table if i want to extract multiple data from a column say, i would like to extract where _HEIGHT = (5.1,5.2,5.3)
How i should add the query?

  • 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-15T21:08:03+00:00Added an answer on June 15, 2026 at 9:08 pm

    As they are text and not numbers, you need to encapsulate them in quotes in your query string.

    _NAME + " BETWEEN " + "'A'" + " AND " + "'S'"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a little application in android which would have a server part
I'm writing an Android application, which uses AccountManager to get the token. From an
In Android I am writing an application in which, I would like to capture
I am writing an android application to which I have granted the following privileges
I'm writing an Android application which requires the user to login. I have a
I´m writing an application for Android in which I have a character that I
I'm writing my first Android application and I have one activity that I'd like
I am writing an Android application in which I'll have to create a video
I am writing an Android application which can enable and disable the Network Data
I am writing an Android application which uses several 3D models. Such a model

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.