Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Function CONCAT on JPQL

843830Feb 20 2008 — edited Feb 21 2008
Hi everybody.

I'm currently working on a J2SE application and i'm using JPA as persistence framework, it works very fine, but when I try to do a query with a function CONCAT it came with an error:

+
Caused by: Exception [TOPLINK-8025] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Syntax error parsing the query [SELECT CONCAT(CONCAT(d.nombre, ' ', CONCAT(d.apellidoPaterno, ' ') d.apellidoMaterno)) FROM Datospersonales as d, Personaljuzgado as p WHERE p.idDatosPersonales = d.idDatosPersonales ], line 1, column 8: unexpected token [CONCAT].
Internal Exception: line 1:8: unexpected token: CONCAT
+

The statement in MySQL that I'm trying to do is :

+
SELECT CONCAT(datospersonales.nombre, ' ', datospersonales.apellidoPaterno, ' ', datospersonales.apellidoMaterno )
FROM datospersonales, personaljuzgado
WHERE personaljuzgado.idDatosPersonales = datospersonales.idDatosPersonales;
+

Any help will be grateful, thanx a lot :D
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2008
Added on Feb 20 2008
2 comments
1,372 views