The code in the article did not work for me, I had to rewrite the stored procedure, the below works
CREATE PROCEDURE
DropColumnConstraints
@TableName varchar(256),
@ColumnName varchar(256)
AS
BEGIN
declare @sql_value nvarchar(4000);
declare @obj_name varchar(256);
declare name_cursor cursor for
select
objs.name
from dbo.sysconstraints const
inner join dbo.syscolumns cols
on const.colid = cols.colid
and const.id = cols.id
inner join dbo.sysobjects objs
on objs.id = const.constid
where cols.id = OBJECT_ID(@TableName)
and cols.name = @ColumnName
OPEN name_cursor
FETCH NEXT FROM name_cursor
INTO @obj_name
WHILE @@FETCH_STATUS = 0
BEGIN
set @sql_value = ('alter table ' + @TableName +' drop constraint '+@obj_name);
print 'Dropping '+@obj_name;
execute sp_executesql @sql_value;
FETCH NEXT FROM name_cursor
INTO @obj_name;
END
CLOSE name_cursor
DEALLOCATE name_cursor
end
go