Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » SELECT and CONCAT
SELECT and CONCAT [message #704202] Thu, 28 July 2011 07:29 Go to next message
Oliver Baum is currently offline Oliver Baum
Messages: 6
Registered: July 2009
Junior Member
Hi,

hope somebody can help me. I'm not sure if it is a bug.

I use a query with JPA 2.0 and eclipselink 2.3. But the follow query dosn't work and I don't know why. I use a Oracle 11G database.

The query:
select distinct v from Partnersuche v where v.partnerIndex in (SELECT
concat(p.pk.nebenPartnerNr, max(p.pk.paLfdAdressNr)) from PartnersucheV p
where p.psPartnerartKey = 1 group by p.pk.nebenPartnerNr)


And here the error:
java.lang.IllegalArgumentException: An exception occurred while creating a
query in EntityManager:
Exception Description: Syntax error parsing the query [select distinct v
from Partnersuche v where v.partnerIndex in (SELECT
concat(p.pk.nebenPartnerNr, max(p.pk.paLfdAdressNr)) from PartnersucheV p
where p.psPartnerartKey = 1 group by p.pk.nebenPartnerNr)], line 1, column
71: unexpected token [concat].
Internal Exception: NoViableAltException(16@[1292:16: ( DISTINCT )?])


I used this query before with Hibernate and it works.

Thanks for help
Oliver
Re: SELECT and CONCAT [message #704353 is a reply to message #704202] Thu, 28 July 2011 10:23 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Please log a bug for this issue.

James : Wiki : Book : Blog : Twitter
Previous Topic:Addtional Foreign Key
Next Topic:(no subject)
Goto Forum:
  


Current Time: Fri Aug 29 10:29:58 EDT 2014

Powered by FUDForum. Page generated in 0.01857 seconds