Missing EOF on Execute OQL Statement

0
Hi colleagues,   I am running an OQL Statement, but i have an error on this on console   The error is  Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: OQL query cannot be parsed: SELECT t1.SpotID as SpotID, t2.Name as segmentname, Count(*) as numberofspots FROM SCi_Workflow.LineItem t1 LEFT JOIN t1/SCi_Workflow.LineItem_Segment/SCi_Workflow.Segment t2 WHERE t1.SpotID = '55555' GROUP BY t1.SpotID, t2.Name ORDER BY t1.SpotID, t2.Name HAVING COUNT(*) > 10 Error on line 4 character 82: missing EOF at 'HAVING' Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s):      InternalOqlTextGetRequest (depth = -1): SELECT t1.SpotID as SpotID, t2.Name as segmentname, Count(*) as numberofspots FROM SCi_Workflow.LineItem t1 LEFT JOIN t1/SCi_Workflow.LineItem_Segment/SCi_Workflow.Segment t2 WHERE t1.SpotID = '55555' GROUP BY t1.SpotID, t2.Name ORDER BY t1.SpotID, t2.Name HAVING COUNT(*) > 10     at SCi_Workflow.ACT_SpotOverview (JavaAction : 'Execute OQL statement') Hope someone can help. I only got an error when i used the HAVING, Thanks :)
asked
1 answers
1

Hi John,

I don't think OQL supports the HAVING statement. Maybe you can filter them out from the list after the retrieve?

In the app you’ll get a return list of the object type that you specified for the OQL action. On that list, you can do a Filter list operation where you can filter out all objects that have fewer ‘numberofspots’ than 10.

 

(repost from main account)

answered