Could it be due to the full outer join where you join on the CPT_CODE?
Quote:
|
and O.[transaction code] = I.[cpt code] )
|
You may want to make that a conditional join, which could lead to a partial cartesian product. You could correct it with a distinct or maybe joining to the table again on that condition?
Code:
and( O.[transaction code] = I.[cpt code]
or i.cpt code = '') )