I am running a select statement on our production database and our testing database. On the production database this select returns results, but none on the testing database. I have verified that the tables/data on both are identical, so I am stumped as to why the testing database returns no results. Is there some sort of setting that may need to be changed?
Query:
SELECT e.ID_NUMBER
FROM ENTITY e
WHERE e.PERSON_OR_ORG = 'P'
AND EXISTS (SELECT *
FROM HANDLING
WHERE id_number = e.id_number
AND hnd_type_code = 'X'
AND hnd_status_code = 'A')
AND EXISTS (SELECT *
FROM HARRIS_DATA
WHERE id_number = e.id_number
AND NVL(lost_deceased, ' ') <> 'D')
Query:
SELECT e.ID_NUMBER
FROM ENTITY e
WHERE e.PERSON_OR_ORG = 'P'
AND EXISTS (SELECT *
FROM HANDLING
WHERE id_number = e.id_number
AND hnd_type_code = 'X'
AND hnd_status_code = 'A')
AND EXISTS (SELECT *
FROM HARRIS_DATA
WHERE id_number = e.id_number
AND NVL(lost_deceased, ' ') <> 'D')