SSIS Union All does not return all records

A very beginner question, please. I have a simple script that searches for records in another table - in this case, the doctor assigned to treat the patient. Due to the lack of data quality control in several records, the correct identifier of the doctor is not indicated, so the search returns an inconsistent conclusion. Then I have to create a fictitious doctor for these records. After that, I would like to combine 2 recordsets into 1.

In my test database, I have a total of 20,599 entries. Search conversion is returned with 9,124 entries, which provide non-matching output and 11,475 entries. What I do not understand is when I do Union All, the result is a total of 17,885 records. (see screenshot below, @Find Servicing Doctor issue, then Union All)

This problem has never occurred before. I use the same technique several times in another section of this script, and they all return the correct number of records. Any help would be greatly appreciated.

Screenshot showing the number of records

+3
source share
2 answers

You can do this without two search paths.

  • You just set "Ignore rejection" in the first search box.
  • " " - :

    Doctor-Replace'ServicingDoctor'-isnull (ServiceingDoctor)? "NA":

0

. Union all , , -, , , . , .

0

All Articles