摘要:
SELECT[EmpTemplateHistoryID],[EmployeeID],[TemplateID],[AdjustStatus],[AdjustReason],[AdjustTime],isnull((select top 1 [EmpTemplateHistoryID] from [EmpPRTemplateHistory] where [EmployeeID]=a.EmployeeID),NEWID()) [AdjustBeforeHistoryID],[Remark],getdate()FROM @DataTable awhere NOT EXISTS(SELECT * FR. 阅读全文