DROP VIEW IF EXISTS View_EmployInOutRecord;





---考勤预警表
CREATE TABLE [dbo].[SGManPower_WarningResult] (
  [WarningId] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [ProjectId] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [UnitId] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [UnitWorkId] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [WorkPostId] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [WarningType] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [ContinuousDays] int  NULL,
  [StartDate] date  NULL,
  [EndDate] date  NULL,
  [PlanQuantity] int  NULL,
  [ActualQuantity] int  NULL,
  CONSTRAINT [PK__SGManPow__21457158BE7F041D] PRIMARY KEY CLUSTERED ([WarningId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
)  
ON [PRIMARY]
GO

ALTER TABLE [dbo].[SGManPower_WarningResult] SET (LOCK_ESCALATION = TABLE)
GO

CREATE NONCLUSTERED INDEX [IX_SGManPower_WarningResult_ProjectId_WarningType]
ON [dbo].[SGManPower_WarningResult] (
  [ProjectId] ASC,
  [WarningType] ASC
)