31
Views
4
Comments
Solved
 How do left join with the same table in the Aggregate of the Outsystem ?

How do left join with the same table in the Aggregate of the Outsystems ?




Captura de tela 2024-09-07 054645.png
2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi @Vivian Mattos ,

just add it a second time as source, service studio will give it the name Drink2 or something

You can click on the name an give each one a meaningfull name so your filters and code dealing with the output will be more readable

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Vivian,

You cannot join an entity (table) with the reference of itself. This is not a limitation of OutSystems: in SQL this is also not possible. Instead, you add another instance of the same entity (like Dorine explained). This is similar to SQL, where you would use an alias like this:

SELECT *
FROM MyTable	
INNER JOIN MyTable MyTableChild ON MyTableChild.ParentId = MyTable.Id

In an Aggregate, you do the above like this:

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi @Vivian Mattos ,

just add it a second time as source, service studio will give it the name Drink2 or something

You can click on the name an give each one a meaningfull name so your filters and code dealing with the output will be more readable

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Vivian,

You cannot join an entity (table) with the reference of itself. This is not a limitation of OutSystems: in SQL this is also not possible. Instead, you add another instance of the same entity (like Dorine explained). This is similar to SQL, where you would use an alias like this:

SELECT *
FROM MyTable	
INNER JOIN MyTable MyTableChild ON MyTableChild.ParentId = MyTable.Id

In an Aggregate, you do the above like this:

2023-12-14 09-56-57
Yogesh Javir

try add same table as source and make join as accordingly

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

That same answer has been given twice, two days ago. Please read the other replies before replying yourself!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.