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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:23:13+00:00 2026-06-14T02:23:13+00:00

I make the following query in SQLitemanager (SQL DB App for Android): SELECT *

  • 0

I make the following query in SQLitemanager (SQL DB App for Android):

SELECT * FROM fahrer, fahrzeuge, nutzungsarten, fahrtenbuch WHERE fahrtenbuch.nutzungsart_id = nutzungsarten._id AND fahrtenbuch.fahrzeuge_id = fahrzeuge._id AND fahrtenbuch.fahrer_id = fahrer._id ORDER BY SUBSTR(fahrtenbuch.startdatum,7,4), SUBSTR(fahrtenbuch.startdatum,4,2), SUBSTR(fahrtenbuch.startdatum,1,2) ASC

The returned order is as expected. The date is correctly sorted by dd.mm.yyyy.

But when I execute the query in my DB-Helper class, the order is not the same.
In the DB-Helper class:

final String MY_QUERY = "SELECT * FROM fahrer, fahrzeuge, nutzungsarten, fahrtenbuch WHERE fahrtenbuch.nutzungsart_id = nutzungsarten._id AND fahrtenbuch.fahrzeuge_id = fahrzeuge._id AND fahrtenbuch.fahrer_id = fahrer._id ORDER BY SUBSTR(fahrtenbuch.startdatum,7,4), SUBSTR(fahrtenbuch.startdatum,4,2), SUBSTR(fahrtenbuch.startdatum,1,2) ASC";
return mDb.rawQuery(MY_QUERY, null);

In my activity:


Cursor curCSV = mDbHelper.fetchAllFahrtenbuchASC();
curCSV.moveToFirst();
while(curCSV.moveToNext()) 
{
   System.out.println("Date of entry: " +curCSV.getString(18));
} 

curCSV.close();

Does anyone know why this is not working?

  • 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-14T02:23:14+00:00Added an answer on June 14, 2026 at 2:23 am

    This code:

    curCSV.moveToFirst();
    while(curCSV.moveToNext()) ...
    

    skips over the first record.
    Use instead:

    if (curCSV.moveToFirst())
        do {
            ...
        } while (curCSV.moveToNext());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following query is in SQL: SELECT r.reservation_no, f.flight_no, r.departure_date, f.departure_time, f.duration FROM flights
my view should be make the following mysql query: SELECT `egress_transport_documents`.* FROM `egress_transport_documents` WHERE
I have the following query: SELECT M.Col7, M.Col8, M.Col9, M.Col10 FROM [MyTable] M WHERE
I'm trying to make a query that grabs a single row from an SQL
I have the following query: SELECT timestamp, COUNT(*) FROM table GROUP BY timestamp But
The following query returns data right away: SELECT time, value from data order by
I'm trying to make the following query work: SELECT DATE_FORMAT( date, '%Y %m' )
i need to make a group by clause with the following query: SELECT NAME,
I want make sql query which will insert values from one table to another
I have produced the following query. SELECT t.id AS playerid, dp.first_name, dp.surname FROM .TBL_FOOT_CAREER_TEAMS.

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.