The Ultimate Index-Less Foreign-Key Finder

  • YeshuaAgapao

    Hall of Fame

    Points: 3495

    Comments posted to this topic are about the item The Ultimate Index-Less Foreign-Key Finder

  • Douglas Osborne-456728

    SSCommitted

    Points: 1569

    Nice script.

    Might this

    'CREATE NONCLUSTERED INDEX IX__' + parentschemas.name + '_' + parentobjects.name + '__' + REPLACE(foreign_key_columns.foreign_key_columns, ', ', '_') + ' ON ' + parentschemas.name + '.' + parentobjects.name + ' (' + foreign_key_columns.foreign_key_columns + ')' AS FKIndexCreate

    be this

    'CREATE NONCLUSTERED INDEX IX__' + parentschemas.name + '_' + parentobjects.name + '__' + REPLACE(foreign_key_columns.foreign_key_columns, ',', '') + ' ON ' + parentschemas.name + '.' + parentobjects.name + ' (' + REPLACE( foreign_key_columns.foreign_key_columns, ',', '' ) + ')' AS FKIndexCreate

    Great Job, As Usual,

    Doug

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Thanks for the script.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply