We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I agree with you and @kimbaudi that matching on the manager and employee codes does not work if there are managers without subordinates and that it is necessary to match on company_code everywhere. I also believe that yours ist the most correct (if there is such a thing) solution when it comes to best practices.
However since the question seems to be looking for a solution without joins, here is my solution using the implicit join via WHERE proposed by @karthiksk and @mialkin:
New Companies
You are viewing a single comment's thread. Return to all comments →
I agree with you and @kimbaudi that matching on the manager and employee codes does not work if there are managers without subordinates and that it is necessary to match on
company_code
everywhere. I also believe that yours ist the most correct (if there is such a thing) solution when it comes to best practices.However since the question seems to be looking for a solution without joins, here is my solution using the implicit join via
WHERE
proposed by @karthiksk and @mialkin: