• TravisDBA,

    I notice some tables where still being skipped after your latest changes. The query excludes tables without a clustered index.

    To include them, modify the where clause to use (sysindexes.indid <= 1) .

    The Adventureworks database has a few tables that use HEAP instead of a clustered index. This makes it a good database to test the query against.

    David Bird