The below code works, but when it runs a 2nd time, the error message is generated:
"There is already an object named 'PK_UpdatesQQ' in the database."
I cannot get the constraint to drop even though the temp table is dropped. There appears to be a unique step because it is a constraint attached to a temporary table?
CREATE TABLE [dbo].[#Temp00](
[VisitID] [int] NOT NULL,
DecisionTmForDispFromObsv varchar(24) NOT NULL DEFAULT '',
DispositionType varchar(300) NOT NULL DEFAULT '',
DischargeTo varchar(300) NOT NULL DEFAULT ''
) ON [PRIMARY]
ALTER TABLE [dbo].[#Temp00] ADD CONSTRAINT [PK_UpdatesQQ] PRIMARY KEY CLUSTERED ( [VisitID] ASC ) WITH (IGNORE_DUP_KEY = ON) ON [PRIMARY]