SGGL_JT/DataBase/版本日志/SGGLDB_2025-07-14-geh.sql

39 lines
2.0 KiB
Transact-SQL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

alter table Information_ActionWorkLedger add KeyWorkNum int null
alter table Information_ActionWorkLedger add KeyWorkOKNum int null
alter table Information_ActionWorkLedger add KeyWorkOKRate nvarchar(20) null
GO
ALTER VIEW [dbo].[View_Information_ActionWorkLedger] AS
SELECT
Report.ActionWorkLedgerId,
Report.UnitId,
Report.ReportDate,
Report.YearId,
Report.Quarter,
Report.UpState,
Report.HandleState,
Report.KeyWorkNum,
Report.KeyWorkOKNum,
Report.KeyWorkOKRate,
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters,
u.UnitName,
Report.HandleMan,
US.UserName
FROM dbo.Information_ActionWorkLedger AS Report
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId
LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter
Left join Base_Unit as u on u.UnitId=Report.UnitId
LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan
GO