I have got a query in sqlite
String[] args = { Report_DATETIME,Report_DATETIME, EMSUnitCode };
String sql = "Select * from TR_ReportingAll Where (Report_DATETIME<? or ( Report_DATETIME=? and EMSUnitCode!=?)) order by Report_DATETIME,EMSUnitCode DESC Limit 10";
mCursor = database.rawQuery(sql, args);
Why values of mCursor is ASC? When i get mCursor.moveToNext.
Your sort criteria is
Report_DATEIME ASCand then, all items with equal Report_DATEIME are sorted byEMSUnitCode DESC.DESCdoes not apply to allORDER BYfields, but only those you set them for andASCis default order if not specified otherwise. Therefore if you want to date to be descending change your order toorder by Report_DATETIME DESC,EMSUnitCode DESC