I would avoid Head as Alias give all columns an alias and improve the OQL like this (try editing it in a temporary data_set)
SELECT
Sug.NameSuggestion AS NameSuggestion,
Sug.Status AS Status,
head1.DescHead AS DescHead
FROM Core.Suggestion AS Sug
INNER JOIN Core.Suggestion_Department/ImportData.Department as head1
or if your headquarter is a specialisation of Department
SELECT
Sug.NameSuggestion AS NameSuggestion,
Sug.Status AS Status,
head1.DescHead AS DescHead
FROM Core.Suggestion AS Sug
INNER JOIN Core.Suggestion_Department/ImportData.HeadQuarter as head1
Hi Raul,
From 10.19 onwards, you can create view entities. https://docs.mendix.com/refguide/view-entities/ Have a look here https://www.youtube.com/watch?v=8h6WDpJZME4 for a brief overview.
What I like about it is that the OQL editor proves validity of the statement.
So if you are on 10.19 or above, have a look.
Go Make It
The way to write a join is by first stating one entity, then the name of the association, and then the associated entity, e.g., Shop.OrderLine/Shop.OrderLine_Order/Shop.Order
See example here with a view entity: