i have written the following query String rawQuery= "select * FROM (select email,name,createdat,ROW_NUMBER() OVER (PARTITION BY email ORDER BY createdat DESC) AS RowNumber FROM vitals ) a where RowNumber=?";
this should return me data that contains unique email id but other data that is not unique. But i am getting the following error Caused by: android.database.sqlite.SQLiteException: near "(": syntax error (code 1): , while compiling: select * FROM vitals,(select email,name,createdat,ROW_NUMBER() OVER (PARTITION BY email ORDER BY createdat DESC) AS RowNumber FROM vitals ) a where RowNumber=? i reffered to this linkenter link description here
mardi 1 mars 2016
android sqlite get only one distinct cloumn and get all other columns
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire