Here is the problem I'm facing to :
- I receive expected Xs from the client
- I receive realized Xs from the firm agencies
- I have to full outer join the expected and realized Xs on code equality AS LONG AS THEY BELONG TO THE SAME JOB FILE
For example :
Realized Xs for job file #123 : A and B
Expected Xs for job file #123 : A and C
Expected Xs for job file #456 : B
Expected result :
Job_File Realized Expected
-------- -------- --------
123 A A
123 B NULL
123 NULL C
456 NULL B
Of course 123's realized B should NEVER match with 456's expected B since they don't belong to the same job file.
So, it is as if I wanted to simultaneously full outer join on the code and inner join on the job file id.
That seems weird but... very logical, in fact. How on earth could I do such a thing ???
Thank you very much in advance for your precious help ! :-)