Hi Kamulegs,

Your SQLiteManager includes a version of SQLite >=3.7.16 , and your android
application does not.

Indeed the syntax "  (b JOIN c ON b.id = c.id)" is only accepted without
this errror after 3.7.16.
==> If you can rewrite your syntax without these parenthesis (like below),
all should be fine.

*SELECT M._id as Meter_id, M.MeterNumber, R1.ReadingDate as ReadingDate,
R1.Reading AS CurrentReading, R2.ReadingDate AS PrevReadingDate, R2.Reading
AS PrevMeterReading, R2.Rate as Rate, R2._id as _id,R1.TenantMeter_id
FROM Meters AS M INNER JOIN TenantMeters ON M._id = TenantMeters.Meter_id
INNER JOIN MeterReading AS R1 INNER JOIN MeterReading AS R2 ON
R1.TenantMeter_id = R2.TenantMeter_id ON TenantMeters._id =
R1.TenantMeter_id
WHERE (((R2.ReadingDate)=(SELECT Max(R3.ReadingDate)
      FROM [MeterReading] AS R3
      WHERE (R3.TenantMeter_id = R1.TenantMeter_id)
        AND (R3.ReadingDate < R1.ReadingDate)
    ))) OR (((R2.TenantMeter_id) Is Null))
*
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to