delete records of a cursor filled with the result of a query

0

Hi, I've made a very simple query and it gives me this information.

   select * from personas ORDER BY CAST(checkm.orden as integer)

I have placed the results in a cursor. to then show them in a listview

As you can see, the type field is composed of 0 and 1

I try to prevent the result from having consecutive VALUES equal to 1 in the TYPE field

I try to look for this.

I thought about traversing the cursor and eliminating the ones I want.

if (Cursor.getCount() > 0) {

    int tipo_anterior = 1;
    for (int i = 0; i < checkmCursor.getCount(); i++) {
      if(tipo_anterior  == tipo)
   { //eliminar el registro del cursor de la posicion i  
   }                    
    checkmCursor.moveToNext();
}

How can I delete that cursor record or how can I do it? already try by means of sql but the query that does this work is very slow when executing. and it does not help me much.

    
asked by Gerard_jcr 28.01.2018 в 02:07
source

0 answers