lundi 20 juillet 2015

How to do a rtrim() to a Android Cursor query?

I have the following query:

Cursor c = sd.query(itemsTable.Table_Name, columns, itemsTable.ItemNumber + "= ?", selectionArgs, null, null, null);

I need to be able to do this:

'SQL Query I am running on the database using for testing
select * from items where rtrim(itemnumber) = '292664'

Where itemnumber is my selectionArgs.

The SQL query returns the correct results but the cursor query returns null.

I would rather not change the way I am running queries and would like to know if there is a way to convert my existing query to work the same as the SQL query.

Aucun commentaire:

Enregistrer un commentaire