Mendix OQL Query From clauses dont support long paths

1
Good Day, I'm currently busy with reporting and using OQL for the first time. Code Below: select OpportunityName as Name, SalesStage as Stage, LastUpdated, FullName as Rep from CRM.Opportunity, CRM.Opportunity_Account/Administration.Account where CRM.Opportunity/SalesStage != 'Lost' The FullName is over an association which seems to be causing the problem. However if i don't use the association then I get incorrect results. Is there way around this to get the correct results? Please let me know if you need additional details. Regards,
asked
2 answers
1

Have you tried to inner join the Account entity with an alias? like this:

SELECT AdministrationPerson/FullName AS Fullname FROM Administration.Person AS AdministrationPerson INNER JOIN AdministrationPerson/Administration.PersonAccount/Administration.Account AS Administration_Account

answered
0

Thank You.

I done some reading up on Inner Join and based of your example I was able to get it right. ( Had trouble getting the inner Join query to work with the rest but I've figured it out.

select OpportunityName as Name, SalesStage as Stage, LastUpdated, FullName as Rep from Administration.Account as Account INNER Join Account/CRM.Opportunity_Account/CRM.Opportunity where CRM.Opportunity/SalesStage != 'Lost'

I have a few more to do so I'll see if I understand what I've done lol.

answered