Hi guys,
What the hell am I doing wrong ? This is really pissing me off. As simple as it may be, it got me realy frustrated because it doesn't work proper.
So...I have this 2 tables A,B. The combination Resource id / Cost account is the primary key. What I need is to get all the values from A and add the C column from B, where is the case.
Table A
--------------------------
Resource Id | Cost Account
Table B
---------------------------------
Resource ID | Cost Account | C
The query should be this:
Code:
SELECT A.*, B.C
FROM A LEFT JOIN B ON (A.[Cost Account] = B.[Cost Account]) AND (A.[Resource ID] = B.[Resource ID]);
The problem is that I get nothing in the C column for the combination Resource ID | Cost Account, when Cost Account is Null, even if in the B table there is data.
Please tell me I'm stupid I don't know how to use the Left Join....
Edit:
I checked the previous topics with null related issues but I still have trouble understand the outcome of the those disscusions.