-----2022-05-27------------------------ update DataInspection set BatchId=Id where BatchId is null update QCChallenge set Code=ChallengeCode update QCChallenge set ChallengeCode='Q'+ RIGHT('00000'+CAST( Code AS nvarchar(50)),5); -----2022-08-11------------------------ update [dbo].[Site] set Code= convert(int,RIGHT(SiteCode,4)) update Site set SiteName= substring(SiteName,1,charindex('Ò½Ôº',SiteName)+1),AliasName=substring(SiteName,charindex('Ò½Ôº',SiteName)+2,30) where SiteName like '%Ò½Ôº%Ò½Ôº' update Doctor set Physician='Chief Physician',PhysicianCN='Ö÷ÈÎҽʦ' where RankId='dcbf4d1a-8373-4539-a0ae-1ba76d57bb48' update Doctor set Physician='Deputy Chief Physician',PhysicianCN='¸±Ö÷ÈÎҽʦ' where RankId='3a6e3335-cea4-4803-a136-d6301883a937' update Doctor set RankOther='Professor',RankOtherCN='½ÌÊÚ' where RankId='dcbf4d1a-8373-4539-a0ae-1ba76d57bb48' update Doctor set RankOther='Associate Professor',RankOtherCN='¸±½ÌÊÚ' where RankId='3a6e3335-cea4-4803-a136-d6301883a937' update Doctor set Physician='Staff',PhysicianCN='ҽʦ' where RankId='82411c2e-9832-4c6f-a859-e3b6e796760d' update DataInspection set JsonDetail= replace(cast(JsonDetail as varchar(max)),'Insepection','CommonData') update ReadingClinicalData set FileCount=(select count(*) from ReadingClinicalDataPDF where ReadingClinicalDataId =ReadingClinicalData.Id) update NoneDicomStudy set FileCount=(select count(*) from NoneDicomStudyFile where NoneDicomStudyId =NoneDicomStudy.Id) update DataInspection set CreateUserName= (select UserName from [User] where [User].Id = DataInspection.CreateUserId) update DataInspection set RoleName=(select UserName from [User] INNER join UserType on [User].UserTypeId =UserType.Id where [User].Id=DataInspection.CreateUserId) update DataInspection set CreateUserRealName=(select LastName+' / '+FirstName from [User] where [User].Id=DataInspection.CreateUserId) update TrialDocUserTypeConfirmedUser set CreateUserId=ConfirmUserId,CreateTime=SignFirstViewTime update SystemDocConfirmedUser set CreateUserId=ConfirmUserId,CreateTime=SignFirstViewTime update TrialDocUserTypeConfirmedUser set CreateUserId=ConfirmUserId,CreateTime=getdate() where SignFirstViewTime is null update SystemDocConfirmedUser set CreateUserId=ConfirmUserId,CreateTime=getdate() where SignFirstViewTime is null update TrialDocUserTypeConfirmedUser set IsDeleted=0 where IsDeleted is null update SystemDocConfirmedUser set IsDeleted=0 where IsDeleted is null