I get Unexpected token '%' when use this JPQL query: In my case I use the upper function but it could be anyone.
@Query("SELECT s FROM Entity s WHERE UPPER(s.asunto) LIKE %UPPER(:asunto)% ")
public Entity namedMethod(@Param("asunto") String asunto));
I need to add LIKE %:param% to find any coincidence of the param inside my text.
Have tried :
@Query("SELECT s FROM Entity s WHERE UPPER(s.asunto) LIKE '%'UPPER(:asunto)'%' ")
Unexpected token: UPPER
@Query("SELECT s FROM Entity s WHERE UPPER(s.asunto) LIKE '%UPPER(:asunto)%' ")
Unexpected token: UPPER
No luck in there either.
Thanks in advance.