mssql partitions table dist

select * from (SELECT o.[name] obj_name, o.[type] obj_type, i.[name] idx_name, i.[index_id] idx_id, f.[name] file_grp FROM sys.indexes i INNER JOIN sys.filegroups f ON i.data_space_id = f.data_space_id INNER JOIN sys.all_objects o ON i.[object_id] = o.[object_id] WHERE i.data_space_id = f.data_space_id AND o.type = 'U' -- User Created Tables ) q1 where q1.file_grp like 'FG%'