Skip to main content


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 11:29 Go to next message
Oliver Baum is currently offline Oliver BaumFriend
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 14:23 Go to previous message
James Sutherland is currently offline James SutherlandFriend
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 Mar 29 05:23:27 GMT 2024

Powered by FUDForum. Page generated in 0.03666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top