Even this OQL gives the same error:
Select Name from
(SELECT * FROM Sales.Customer)
Regardless of any surrounding double-quotes. It just seems to be not possible to use any sub_oql in the FROM part.
Therefor, this must be a bug in the OQL-module. Try getting in contact with the OQL-module creator. See if he can fix this.
I think you need to add a “as t” or simliiar name then ‘t’ for the sub query.
Following is the feedback from Mendix team
I can inform you that the OQL query you are using is not supported:
select T.Name as Name from (select Name from Sales.Customer) as T
The restriction refers to the top level query. You can only do
select * from (select ...).
Please note that the restriction only applies if the subquery occurs in the
from clause, subqueries in
where clauses are not affected.
We are checking to see if there is another way to do this OQL query or if it is on the roadmap to be added.
Why are you making a subquery, with same result'?
Why are you using the app name? instead of Sales."Order".TotalPrice use Order.TotalPrice
Mendix R&D is investigating this problem. I will keep this topic updated
You sub query statement is wrong, should have a naming after the closing bracket. for example:
Select Name from (SELECT * FROM Sales.Customer)A
I have the same problem! I simple “subquery” statement doesn’t work:
a.fee as fees
(SELECT facts.Fee as fee FROM MyModule.cost_facts as facts ) as a
There are any updates or solutions?