fix handling of numeric values for SQLite in comparisons