katrina11
Technical User
- Apr 30, 2011
- 108
When I run the following code I get a bunch of DiagnosisCode values which are NULL
My questions are the following:
1.Could it happen because left hand of the equation is not nullable while right had is (both are varchar)?
2. If it cannot happen because of this reason then what do you thing might be a reason?
The thing is that although subset is less then claim table I still would expect at least a few missing values....
Thank you for the consideration!
Katrin
However when I run the same code with a right join I do not get any empty/missing fields for PrimaryDiagnosisCode:select *
FROM DW.dbo.Claim CL
inner join dw.dbo.Member md on md.memberid=ch.memberid
left outer join ##subset dg cl.PrimaryDiagnosisCode=dg.DiagnosisCode
Actually "DiagnosisCode" field allows null values while PrimaryDiagnosisCode from Claim table does not.select *
FROM DW.dbo.Claim CL
inner join dw.dbo.Member md on md.memberid=ch.memberid
right outer join ##subset dg cl.PrimaryDiagnosisCode=dg.DiagnosisCode
My questions are the following:
1.Could it happen because left hand of the equation is not nullable while right had is (both are varchar)?
2. If it cannot happen because of this reason then what do you thing might be a reason?
The thing is that although subset is less then claim table I still would expect at least a few missing values....
Thank you for the consideration!
Katrin