Not sure if you can trace the SPId and kill it, but an ugly alternative would be to find the original pk constraint and rename it as follows -
DECLARE @NewPKName varchar(50)
IF OBJECT_ID('tempdb..pk_temp
BEGIN
SELECT @NewPKNAME = 'pk_temptable_' + REPLACE(CONVERT(varchar(20
EXEC sp_rename 'pk_temptable', @NewPKName
END
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-02-09 at 12:57:55ID: 23594404
please try this syntax:
Select allOpen in new window