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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:22:11+00:00 2026-05-18T12:22:11+00:00

I have my database query currently set up like so: Edit, By the way

  • 0

I have my database query currently set up like so:

Edit, By the way my variables (_ID, CAT_ITEM and BUDGET_AMOUNT) actualy contain exactly the same text and formatting as they are written, silly i know, but anyway that shouldn’t be the problem

private String[] from = {_ID, CAT_ITEM, BUDGET_AMOUNT, };
private String orderBy = _ID + " ASC";
private String whereIn = "IN_OUT='in'";

Cursor cursor = db.query(CAT_BUD_TAB, from, whereIn, null, null, null, orderBy);

Which does exactly what i want it to do, but i wanted to try using a rawQuery instead (just to get the hang of query statements and test it out, also i wouldn’t need so many string variables).

Here’s what i came up with:

private String incomeQuery = "SELECT _ID, CAT_ITEM, BUDGET_AMOUNT FROM CAT_BUD_TAB WHERE IN_OUT=’in’";
Cursor cursor = db.rawQuery(incomeQuery, null);

However this isn’t working (I get the SQLException no such column) so i’m trying to work out what the difference is, I figure there’s just something wrong with my statement but no idea what. Can anyone offer me any advice? Thanks

  • 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-18T12:22:12+00:00Added an answer on May 18, 2026 at 12:22 pm

    From your code it looks like _ID, CAT_ITEM, BUDGET_AMOUNT and CAT_BUD_TAB are String fields. Are their values the same as the field names?

    Your single quotes also look different between the two queries.

    Not related to your problem, but you will also need to add ORDER BY _ID ASC to the end of the sql to replicate the result order.

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

Sidebar

Related Questions

I have a Microsoft Access database query that I'm trying to import into a
I have an access database, with a query made. I need to automate it
I have a query on my database as such: SELECT * FROM expenses WHERE
I have a ASP.Net page using ADO to query MS access database and as
I have a table story_category in my database with corrupt entries. The next query
I have a table in my database formatted like this: customer old_code new_code C1
I have a WPF application which uses a (currently) local database to act as
I have an set numeric ranges that I would like to optimize. Here's a
I have 4 databases with similar schema's, and I'm trying to create a query
I have database with many tables. In the first table, I have a field

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.