SELECT OBJECT_NAME(object_id), name FROM sys.indexes WHERE name NOT IN ( select i.name as [Index] from sys.indexes i (nolock) join sys.partition_schemes ps (nolock) on ps.data_space_id = i.data_space_id join sys.partition_functions pf (nolock) on pf.function_id = ps.function_id where i.type_desc !='HEAP' ) AND OBJECT_NAME(object_id) IN ( select distinct OBJECT_NAME(object_id) from sys.indexes i (nolock) join sys.partition_schemes ps (nolock) on ps.data_space_id = i.data_space_id join sys.partition_functions pf (nolock) on pf.function_id = ps.function_id where i.type_desc !='HEAP' )