General X++ Development
How do I use `outer join` in X++?
How do I use outer join in X++?
1 answer
Write an answerUse outer join when the primary record should still come back even if the related record does not exist.
CustTable custTable;
SalesTable salesTable;
while select custTable
outer join salesTable
where salesTable.CustAccount == custTable.AccountNum
{
info(strFmt('%1 - %2', custTable.AccountNum, salesTable.SalesId));
}If there is no matching sales order, the customer still comes back and the joined buffer contains default values.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer