hi wBob,
It is still throwing the same error, when running your suggested script. I am sure now that is has something to do with the trigger
trigger code:
CREATE TRIGGER dbo.Update_Resolved_Column ON dbo.FileReport
FOR UPDATE
AS
SET NOCOUNT ON
IF ( UPDATE(Resolved))
BEGIN
DECLARE @newvalue bit
DECLARE @oldvalue bit
DECLARE @resolved bit
SET @newvalue = (SELECT Resolved FROM Inserted)
SET @oldvalue = (SELECT Resolved FROM Deleted)
IF @newvalue != @oldvalue
BEGIN
SET @resolved = (SELECT Resolved FROM Inserted)
INSERT INTO dbo.Updated_FileRecords select dbo.FileReport.FilePath, dbo.FileReport.FileUnavailable ,dbo.FileReport.FileSizeinvalid, dbo.FileReport.HashInvalid, dbo.FileReport.LastModifed, dbo.FileReport.Reported, @resolved from dbo.FileReport;
END
END
same columns for all the three tables dbo.FileReport, dbo.FileReport_Latest and dbo.Updated_FileRecords
CREATE TABLE dbo.Updated_FileRecords
(
FilePath nvarchar(900) NOT NULL,
FileUnavailable bit NULL,
FileSizeinvalid bit NULL,
HashInvalid bit NULL,
LastModifed nvarchar(40) NULL,
Reported nvarchar(23) NULL,
Resolved bit DEFAULT(0),
PRIMARY KEY (FilePath)
) ;