Reputation: 15
I want to do a rawquery and sort the result according to some alphanumeric value. Like I have column ItemId which contains values like A0001,A0002,A0036,B0085 etc.
String query="select S_PriceP,ItemId,ItemName from PDAProduct where ItemId<=A0001 and ItemId>=A0099 order by ItemId";
Is there any way I can achieve this?
Upvotes: 0
Views: 1670
Reputation: 27659
You can use rawQuery.
String query="select S_PriceP,ItemId,ItemName from PDAProduct where ItemId<=A0001 and
ItemId>=A0099 order by ItemId";
Cursor objCursor = objSQLiteDatabase.rawQuery(query, null);
Upvotes: 1
Reputation: 6197
With the little info you have given us, my best answer would be to look at SQLiteDatabase docs... in particular, you want one of the query
methods. If you were to post some of the code you have tried we might be able to find what you're missing.
Upvotes: 0