Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

The Ultimate Index-Less Foreign-Key Finder Expand / Collapse
Author
Message
Posted Sunday, October 04, 2009 10:04 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, October 21, 2013 4:37 PM
Points: 701, Visits: 211
Comments posted to this topic are about the item The Ultimate Index-Less Foreign-Key Finder


Post #797562
Posted Thursday, October 15, 2009 9:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 1:32 PM
Points: 146, Visits: 327
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
Post #803542
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse