Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » IN with subquery (IN with subquery problem )
IN with subquery [message #1536043] Tue, 30 December 2014 02:26 Go to next message
Baldan Sukhbaatar is currently offline Baldan SukhbaatarFriend
Messages: 1
Registered: December 2014
Junior Member
Hello.
I have a problem with Exception [EclipseLink-8024], Internal Exception: UnwantedTokenException(found=IN, expected 84).

else if (e.getKey().equals("ischanged")) {
where.append("(t.isContractsPK.contractnumber IN: )").append("sql");
params.put("sql", "(SELECT t.isContractsPK.contractnumber FROM IsContracts t GROUP BY t.isContractsPK.contractnumber HAVING COUNT(*) > 1)");

this is my abstractFacade's code.

SELECT t FROM IsContracts t WHERE (t.isContractsPK.contractnumber IN: )sql AND t.regDate1 BETWEEN :startDate AND :endDate AND 1=1 ORDER BY t.regDate DESC

and is compiled query in console display.
How can i solve this. Or eclipselink is not supporting IN with subquery?
Re: IN with subquery [message #1553401 is a reply to message #1536043] Thu, 08 January 2015 17:33 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I'm not sure of the query, but it looks like you are trying to pass SQL as a parameter. Can you show the JPQL you are issuing to EclipseLink? IN should accept a subquery as a parameter.
Previous Topic:JPA READ_ONLY query uses wrong connection
Next Topic:OptimisticLock: exception stack differs for value > version and value < version
Goto Forum:
  


Current Time: Sun Dec 22 05:58:17 GMT 2024

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

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

Back to the top