I will simplify my problem to make the core issue clear: I have a query that does TableA INNER JOIN TableB LEFT JOIN TableC.
The result of the left join is that in the result set, two of the columns might have NULL values in some rows. To fill in the missing values I have to loop over the result set and query another database that has the data (so it is not possible to join in the first place).
My question is: Is there a standard/optimised approach when we need to fill nulls of a result set after a left join?