Use CAST to convert a value to a specific database type.
CAST
Usage
The CAST function is database independent, but requires database support.
Examples
Example 3-1 shows how to use this JPQL extension.
Example 3-1 Using CAST EQL
CAST(e.salary NUMERIC(10,2))
See Also
For more information, see:
"JPQL" http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL