Question

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);
Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top