- Home /
Other
SQLite Sort Ascending order
I'm trying to sort various SQLite database entries prior to putting them into a List Only it's not working, something in my syntax is wrong.
_sqlString = "SELECT * FROM " + SQL_TABLE_OIL_CHANGES + " ORDER BY " + COL_OIL_SERVICE_DATE +" ASC ";
Can someone show me the right way to do it? Thanks!
To answer this would need your database schema and the full SQL string, plus info about how you use the results. That's a lot missing! And what exactly does this have to do with Unity?
This project is in Unity using a list taken from an SQLite database. I want to sort the items by the first element in the table, the service date. If I can do the same thing with a sorted List, even better.
Yes, definitely use: new SortedList<DateTime, row_type>(). But it won't help if your problem is not the 'ORDER BY' but something else wrong with your SQL string or how you use the data. There is no point asking questions piecemeal like this: full disclosure or figure it out yourself.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
SQLite, BLOB and UI Image 2 Answers
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Unity3d 3.4.1 sqlite bulid error 3 Answers