Frage

i try to two difrent table data combine in single query by using where condition and group by ,but cant work this query.

cur=dh.rawQuery("select _milkid,milkType,milkLitre,totalAmount from MilkDetail where milkDate='"+reportDate+"'" GROUP BY milkType, null);
War es hilfreich?

Lösung

The string is malformed, GROUP BY milktype is out of the sql syntax

cur=dh.rawQuery("select _milkid, milkType, milkLitre, totalAmount from MilkDetail where milkDate='" + reportDate + "' GROUP BY milkType", null);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top