Re: How to return a value instead of "null" in a join ?
And just to post from a different point of view:
One of the best practices in data management is to seek completeness at all times. This means that missing data (cf. unknown product IDs, missing customer groups etc.) will be marked with clear indicative values (like the one you suggest: 'Unknown') at load time. This can be pretty simple and is very helpful for end-users to interprete the presentated data in a correct way.
What to do?
To table B, add all missing IDs that are present in table A, and give them field values like '*MISSING*' or 'Unknown' or 'Unassigned' Example: