/****** Object:  Index [NonClusteredIndex-20210708-144637]    Script Date: 2021/7/8 14:47:55 ******/
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210708-144637] ON [dbo].[t_d_EmployInOutRecord]
(
	[ProjectId] ASC,
	[RecordDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO


ALTER TABLE Base_Project ADD JTProjectCode nvarchar(50) null
go
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'集团对接项目号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'JTProjectCode'
GO

update Base_Project set JTProjectCode = ProjectCode
go
update RealName_SynchroSet set proCode=(select JTProjectCode from Base_Project where RealName_SynchroSet.proCode=ProjectCode)
GO
update SitePerson_PersonInOutNow set proCode=(select JTProjectCode from Base_Project where SitePerson_PersonInOutNow.proCode=ProjectCode)
GO
update RealName_PersonInOutNow set proCode=(select JTProjectCode from Base_Project where RealName_PersonInOutNow.proCode=ProjectCode)
GO

