Hello,
I am trying to find system names with duplicate entries in our database with a duplicate query. It works sort of. Right now it lists every duplicate instance of some systems and only one of the instances for other systems. It appears that if the (allmid_cpu.sa_suitsid) field is blank for the record, that instance will not show up. Can someone show me how to modify the query below to include these null values? I have tried just adding the following to the design view, but it still did not pick up the Nulls
Expr1: iif(IsNull([sa_suitsid]),"",[sa_suitsid])
SELECT DISTINCTROW allmid_cpu.sys_name, allmid_cpu.dns, allmid_cpu.status, allmid_cpu.in_svc, allmid_cpu.ito_managed, allmid_cpu.vendor, allmid_cpu.sys_script_update, allmid_cpu.vantive_update, allmid_cpu.update_date
FROM allmid_cpu
WHERE (((allmid_cpu.sys_name) In (SELECT [sys_name] FROM [allmid_cpu] As Tmp GROUP BY [sys_name] HAVING Count(*)>1 )) AND ((allmid_cpu.ito_managed)="Y"))
ORDER BY allmid_cpu.sys_name;
Thanks
I am trying to find system names with duplicate entries in our database with a duplicate query. It works sort of. Right now it lists every duplicate instance of some systems and only one of the instances for other systems. It appears that if the (allmid_cpu.sa_suitsid) field is blank for the record, that instance will not show up. Can someone show me how to modify the query below to include these null values? I have tried just adding the following to the design view, but it still did not pick up the Nulls
Expr1: iif(IsNull([sa_suitsid]),"",[sa_suitsid])
SELECT DISTINCTROW allmid_cpu.sys_name, allmid_cpu.dns, allmid_cpu.status, allmid_cpu.in_svc, allmid_cpu.ito_managed, allmid_cpu.vendor, allmid_cpu.sys_script_update, allmid_cpu.vantive_update, allmid_cpu.update_date
FROM allmid_cpu
WHERE (((allmid_cpu.sys_name) In (SELECT [sys_name] FROM [allmid_cpu] As Tmp GROUP BY [sys_name] HAVING Count(*)>1 )) AND ((allmid_cpu.ito_managed)="Y"))
ORDER BY allmid_cpu.sys_name;
Thanks