39 lines
		
	
	
		
			989 B
		
	
	
	
		
			Transact-SQL
		
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			989 B
		
	
	
	
		
			Transact-SQL
		
	
	
	
| 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
 | |
| 
 | |
| 
 |