Commit 33859353 authored by dwentzel's avatar dwentzel

replacement is incorrect.

parent 8c923624
......@@ -37,7 +37,7 @@ BEGIN
--prep the DROP and ADD commands
SELECT @DropSQL = 'ALTER TABLE ' + @SchemaName + '.' + @TableName + ' DROP CONSTRAINT ' + quotename(@ConstraintName) + ';';
SELECT @CreateNoCheckSQL = 'ALTER TABLE ' + @SchemaName + '.' + @TableName + ' WITH NOCHECK ADD CONSTRAINT ' + quotename(@ConstraintName) + ' CHECK(' + @Expression + ');';
SELECT @CreateCheckSQL = REPLACE (@CreateNoCheckSQL,'WITH NOCHECK ADD CONSTRAINTT','WITH CHECK ADD CONSTRAINT')
SELECT @CreateCheckSQL = REPLACE (@CreateNoCheckSQL,'WITH NOCHECK ADD CONSTRAINT','WITH CHECK ADD CONSTRAINT')
SELECT @AlterSQL = 'ALTER TABLE ' + @SchemaName + '.' + @TableName + ' WITH CHECK CHECK CONSTRAINT ' + quotename(@ConstraintName) + ';';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment