Reputation: 579
I am trying to select a every field when a certain equation produces an integer
which means a number that has no decimals. How can you do that in Sqlite?
Upvotes: 1
Views: 699
Reputation: 15875
If you just want rows with out a decimal:
select
"(" + DatabaseOpenHelper.KEY_ROW_ID + " - 1)/4 + 1" as field
from
table
where
field not like '%.%'
EDIT:
Based on comments the calculated field has been added. SQLite supports using alias' in where clauses, so this should work for you.
Upvotes: 2