dimanche 19 avril 2015

how to use group by clause in cursor query?

I want to raise a consolidated report using group by clause on 'helper.TX_NAME' column in the following cursor query.



String[] columns = {VivzHelper.UID, helper.TX_NAME, helper.TX_PARTICULARS, helper.TX_AMOUNT, helper.TX_DATE};

Cursor c = db.query(VivzHelper.TX_TABLE, columns, helper.TX_ID + "='" + name + "' AND " + helper.TX_DATE + " BETWEEN '" + datefrom.from_date + "' AND '" + dateto.to_date + " ' ", null, null, null, null, null);

Aucun commentaire:

Enregistrer un commentaire