Use EXISTS instead of IN
Posted: Tue Dec 28, 2021 1:02 pm
For example:
Code: Select all
select top 10 c.SerialNumber, c.TagNumber from BMC_CORE_BMC_ComputerSystem c
where EXISTS (select top 10 a.serialnumber, a.TagNumber from BMC_CORE_BMC_ComputerSystem a where a.SerialNumber = c.SerialNumber and a.TagNumber IS NOT NULL)
and c.DatasetId = 'BMC.ASSET'