Project

General

Profile

Feature #2683 ยป GeneratePWSMinovaES.txt

M Azid Wahyudi, 04/02/2024 02:44 PM

 
1
DECLARE @toinsertmd125 TABLE
2
(
3
[StartDate] VARCHAR(8)
4
,[EndDate] VARCHAR (8)
5
,[EmployeeID] VARCHAR (20)
6
,[DayType] VARCHAR(50)
7
,[PublicHoliday] VARCHAR(50)
8
,[Notes] VARCHAR(500)
9
,[CreateBy] VARCHAR(100)
10
,[CreateDate] VARCHAR(100)
11
,[ChangeBy] VARCHAR(100)
12
,[ChangeDate] VARCHAR(100)
13
)
14
insert into @toinsertmd125
15
select cal.DateSpecified, cal.DateSpecified,pa25.EmployeeID, cal.DayType, cal.PublicHoliday ,'','system',format(getdate(),'yyyyMMddHHmmssffff'),'system',format(getdate(),'yyyyMMddHHmmssffff') from phrpa0025 pa25
16
left join PHRTMWSCAL cal on pa25.WorkScheduleType = cal.WorkScheduleType and cal.year ='2024'
17
where pa25.WorkScheduleType = 'OVT' and pa25.StartDate = '20240101' 
18

    
19
--SELECT * FROM @toinsertmd125
20
--INSERT INTO dbo.PHRPA0125
21
--SELECT DISTINCT [StartDate],[EndDate],[EmployeeID],[DayType],[PublicHoliday],[Notes],[CreateBy],[CreateDate],[ChangeBy],[ChangeDate] FROM @toinsertmd125
    (1-1/1)