15Sep/090
Howto test if and index exist in SQL Server
IF INDEXPROPERTY(OBJECT_ID('TableName'), 'IndexName', 'IndexID') IS NOT NULL
PRINT 'Index is here'
ELSE
PRINT 'Index not found'
IF INDEXPROPERTY(OBJECT_ID('TableName'), 'IndexName', 'IndexID') IS NOT NULL
PRINT 'Index is here'
ELSE
PRINT 'Index not found'