0

I've been analyzing this situation for days. I have an application developed in a tool called windev that generates an apk. The application has a sqlite database to store and process information.

I've had different behavior in a select union all. Where on Android 4 (Jelly Bean) it works fine but the same apk on Android 13 and up (in the case of my tests I use Android 13) the result is different.

It will be a topic that I am not contemplating in the Manifest or the select is wrong.

insert into InventarioCheckin select a.codterritorio,a.codproducto,sum(a.stockinicial),sum(a.stockpedidos),sum( a.stockfacturado),sum(a.stockrechazo),sum(a.stockdisponible),sum(a.stockrecargas),sum(a.stockdescargas),sum(a.stockremesas),sum(a.stockdevolucion),sum(a.stockdifinicial_venta) from ( select a.* from inventario a, productos b where a.codproducto = b.codproducto and b.tipoproducto = 1 and a.codproducto in (select c.codcajaplastica from productos c where c.tipoproducto = 1 and a.codproducto = c.codcajaplastica) union all SELECT Inventario.codterritorio,Productos.codcajaplastica,0,0,0,0,-cast((SUM(Inventario.stockdisponible)/ AVG(Productos.undporcaja)) as integer) - 1 AS stockdisponible,0,0,0,0,0 FROM Productos, Inventario WHERE Productos.CodBotella = Inventario.codproducto AND Productos.TipoProducto = 1 AND Productos.CodCajaPlastica > 0 AND Productos.CodBotella >0 GROUP BY Productos.codcajaplastica)a group by a.codterritorio,a.codproducto

enter image description here

I have tried in the manifest to change the minimum sdk and the target sdk but I have not had positive results.

  • "I have tried in the manifest to change the minimum sdk and the target sdk but I have not had positive results" -- none of that will impact SQLite. There are [different versions of SQLite based on Android version, and sometimes by device model](https://developer.android.com/reference/android/database/sqlite/package-summary.html) (see also [this SO answer](https://stackoverflow.com/a/4377116/115145)). "the result is different" -- we have no way of knowing what that means. You might want to explain in detail what the difference is. – CommonsWare Jul 08 '23 at 17:35
  • In the image that I just added, on one mobile the result of the select brings me a 1 in the 'stockdisponible' column and the other mobile brings me the value 0 – Marlon J Avila Jul 08 '23 at 17:48

0 Answers0