1
I’m not getting the variable total
, how do I do?
@Query("SELECT SUM(item_valor) AS total FROM Itens WHERE total =>:data")
Itens getMes(String data);
The IDE warns syntax error in the full variable of the WHERE Clause.
My Entity:
@Entity(tableName = AppContext.TABLE_ITENS)
public class Itens {
@PrimaryKey(autoGenerate = true)
private int itemId;
@ColumnInfo(name = "item_doc")
private String doc;
@ColumnInfo(name = "item_name")
private String name;
@ColumnInfo(name = "item_valor")
private Double valor;
Only with this explanation we have no way of knowing where you are using the code minimal example that explains the situation ...
– novic
A IDE avisa erro de sintaxe na variável total da Cláusula WHERE.
has full surname ofsum
and in thewhere
As a filter, can not that way and also total is what in your database? " ie, Cade the layout of this table???" how we can help if content is missing to identify the possible problem !!!– novic