SQL Script - Check for duplicate devices

Comparing devices names to find duplicates

Written by Ines

Last published at: January 27th, 2023

Query Description

Cross check all device names and show only the duplicates with all the details in the table.

Query Results

Query Prior 7.1 Server

select b.*, a.* 

from devices a

join (select DeviceName, count(DeviceName) as Count from Devices Group By DeviceName having count(DeviceName) > 1) b

on a.DeviceName = b.DeviceName


Query for 7.1 Server

select b.*, a.*

from devicefulls a

join (select DeviceName, count(DeviceName) as Count from DeviceFulls Group By DeviceName having count(DeviceName) > 1) b

on a.DeviceName = b.DeviceName