jcrawf02 (6/27/2008)
Sorry, didn't use that in this example. What I ended up doing in my live version is this:LEFT JOIN #member ON (ISNULL(PLANDATA_Claim.enrollid,ENCOUNTER_Claim.enrollid) = #member.enrollid )
Hmmmm.... I suppose that could be ok... never really tried that before. Don't know if it's optimal or not compared to having two derived tables. Probably works out the same way, but not sure. I'll have to try that sometime in the future and see if it differs.
--Jeff Moden
Change is inevitable... Change for the better is not.