openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjackson <jackson.christopher....@gmail.com>
Subject Parse Exception generated when using keyword UPPER
Date Wed, 20 Nov 2013 03:31:55 GMT
Trying to execute the following query:

SELECT x FROM religion x WHERE UPPER(x.value) LIKE UPPER('c%') ORDER BY
x.value ASC

And get the following error:

Caused by: <openjpa-2.2.2-SNAPSHOT-r422266:1462076 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: Encountered "UPPER ( x .
value ) LIKE UPPER" at character 32, but expected: ["(", ")", "+", "-", ".",
":", "<", "<=", "<>", "=", ">", ">=", "?", "ABS", "ALL", "AND", "ANY", "AS",
"ASC", "AVG", "BETWEEN", "BOTH", "BY", "CASE", "COALESCE", "CONCAT",
"COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE",
"DESC", "DISTINCT", "ELSE", "EMPTY", "END", "ESCAPE", "EXISTS", "FETCH",
"FROM", "GROUP", "HAVING", "IN", "INDEX", "INNER", "IS", "JOIN", "KEY",
"LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER",
"MIN", "MOD", "NEW", "NOT", "NULL", "NULLIF", "OBJECT", "OF", "OR", "ORDER",
"OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM",
"THEN", "TRAILING", "TRIM", "TYPE", "UPDATE", "UPPER", "VALUE", "WHEN",
"WHERE", <BOOLEAN_LITERAL>, <DATE_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>,
<INTEGER_LITERAL>, <STRING_LITERAL2>, <STRING_LITERAL>, <TIMESTAMP_LITERAL>,
<TIME_LITERAL>].
	at
org.apache.openjpa.kernel.jpql.JPQL.generateParseException(JPQL.java:13162)
	at org.apache.openjpa.kernel.jpql.JPQL.jj_consume_token(JPQL.java:13036)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_primary(JPQL.java:1980)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_factor(JPQL.java:1958)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_term(JPQL.java:1807)
	at
org.apache.openjpa.kernel.jpql.JPQL.conditional_expression(JPQL.java:1769)
	at org.apache.openjpa.kernel.jpql.JPQL.where_clause(JPQL.java:1587)
	at org.apache.openjpa.kernel.jpql.JPQL.select_statement(JPQL.java:91)
	at org.apache.openjpa.kernel.jpql.JPQL.parseQuery(JPQL.java:63)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:2401)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:2388)
	at org.apache.openjpa.kernel.jpql.JPQLParser.parse(JPQLParser.java:49)
	... 85 more

I believe this SQL query is acceptable, any ideas?



--
View this message in context: http://openjpa.208410.n2.nabble.com/Parse-Exception-generated-when-using-keyword-UPPER-tp7585604.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message