A Microsoft platform for building enterprise-level data integration and data transformations solutions.
The following code will create the constraint if there is no object named Unique_ReportableResults_ReportableResultCode_IsCalculated, but if it already exists, the code will do nothing.
If Not Exists(Select * From sys.objects Where Name = 'Unique_ReportableResults_ReportableResultCode_IsCalculated')
alter table [ReportableResults] add constraint
Unique_ReportableResults_ReportableResultCode_IsCalculated unique (ReportableResultCode, IsCalculated);
Tom