I have two conditions:
- first has a value of Null
- second has a value of XX
In the database there should Not be one without the other and the Rates should match.
I want to find all records where the Rates are different for the Null and XX records.
How can I do this in PL/SQL?
The database is a work db of procedure codes and I'm looking for a query that will find all procedure codes that have a modifier = null and modifier = xx where the rates are not equal. All fields are within the same table.
I'm thinking a nested type query but can't seem to figure it out.
Table name Procedure Code Price
Procedure Code = T2015
Modifier = Null. With a Rate of $32.50
Modifier = XX. With a Rate of $23.70
The table Procedure Code Price holds many CPT & HCPS codes. Each code can have multiple lines with different modifiers and rates. The correct entry for the example above would be the rates for Null & XX modifier are the same. What I want to find are the entries where the rates are different for these two modifiers.