=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java' --- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-03-28 13:16:11 +0000 +++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-03-30 20:18:13 +0000 @@ -177,7 +177,7 @@ if ( !params.isOrQuery() && item.hasFilter() ) { - String queryCol = item.isNumeric() ? ( col + ".value" ) : "lower(" + col + ".value)"; + String queryCol = item.isNumeric() ? ( col + ".value" ) : "lower(" + col + ".value) "; sql += "and " + queryCol + item.getSqlOperator() + " " + StringUtils.lowerCase( item.getSqlFilter( filter ) ) + " "; }