On server A, when I do SELECT COUNT(*) FROM tblzCdCustomFieldLabels I get 574,228. On server B, when I do SELECT COUNT(*) FROM tblzCdCustomFieldLabels I get 2,533,100. So the difference being 1,958,872. However, when I do
I get the difference as 1,985,332. The 4 fields make up the primary key for the table tblzCdCustomFieldLabels. Shouldn't the difference be the same? Is the difference due to having more null values in the rows on server B?
Code:
SELECT *
FROM [A].databasename.dbo.tblzCdCustomFieldLabels prod
WHERE NOT EXISTS (SELECT * FROM [B].databasename.dbo.tblzCdCustomFieldLabels dev
WHERE dev.eff_dt = prod.eff_dt AND dev.prod_ID = prod.prod_ID
AND dev.prodname_CD = prod.prodname_CD AND dev.CO_CD = prod.CO_CD)
I get the difference as 1,985,332. The 4 fields make up the primary key for the table tblzCdCustomFieldLabels. Shouldn't the difference be the same? Is the difference due to having more null values in the rows on server B?