Project

General

Profile

Bug #1943 » WFPMSDEFAULTQUALF.sql

package_update - M Azid Wahyudi, 01/18/2023 06:38 PM

 
1
/*DECLARE @empid_requester VARCHAR(8) = '00001359' DECLARE @now VARCHAR(8) = dbo.fn_formatdatetime(GETDATE(), 'yyyymmdd') DECLARE @AppraisalPeriod VARCHAR(8) = 'F023'*/
2
DECLARE @StartDate VARCHAR(8) DECLARE @EndDate VARCHAR(8) DECLARE @Sequence VARCHAR(8) 
3
SELECT 
4
  @StartDate = Startdate, 
5
  @EndDate = Enddate 
6
FROM 
7
  dbo.PCMAPPPERIOD 
8
WHERE 
9
  code = @AppraisalPeriod 
10
SELECT 
11
  @Sequence = Sequence 
12
FROM 
13
  dbo.PHRPA0047 
14
WHERE 
15
  EmployeeID = @empid_requester 
16
  AND StartDate = @StartDate 
17
  AND EndDate = @EndDate 
18
  AND AppraisalType = 'G' 
19
SELECT  
20
  0 AS App1Level_51, 
21
  0 AS App2Level_51, 
22
  0 AS App3Level_51, 
23
  0 AS App4Level_51, 
24
  0 AS App5Level_51, 
25
  0 AS App6Level_51, 
26
  0 AS App7Level_51, 
27
  0 AS App8Level_51, 
28
  0 AS App9Level_51, 
29
  0 AS App10Level_51, 
30
  0 AS App1Score_51, 
31
  0 AS App2Score_51, 
32
  0 AS App3Score_51, 
33
  0 AS App4Score_51, 
34
  0 AS App5Score_51, 
35
  0 AS App6Score_51, 
36
  0 AS App7Score_51, 
37
  0 AS App8Score_51, 
38
  0 AS App9Score_51,
39
  0 AS App10Score_51,
40
  0 AS App1Percentage_51, 
41
  0 AS App2Percentage_51, 
42
  0 AS App3Percentage_51, 
43
  0 AS App4Percentage_51, 
44
  0 AS App5Percentage_51, 
45
  0 AS App6Percentage_51, 
46
  0 AS App7Percentage_51, 
47
  0 AS App8Percentage_51, 
48
  0 AS App9Percentage_51, 
49
  0 AS App10Percentage_51, 
50
  'F' AS AppraisalType_51, 
51
  0 AS Asesor2, 
52
  0 AS Asesor3, 
53
  pa51.[Description] AS Description_51, 
54
  pa51.EmployeeID AS EmployeeID_51, 
55
  (
56
    SELECT 
57
      ISNULL(
58
        MAX(Sequence) + 1, 
59
        1
60
      ) 
61
    FROM 
62
      dbo.PHRPA0047 
63
    WHERE 
64
      EmployeeID = @empid_requester 
65
  ) AS HeaderSequence_51, 
66
  pa51.[Sequence] AS Sequence_51, 
67
  pa51.SequenceSub AS SequenceSub_51, 
68
  0 AS SelfPercentage_51, 
69
  pa51.[Weight] AS Weight_51, 
70
  0 AS WeightedScore_51, 
71
  0 AS Asesor1, 
72
  pa51.QualificationGroup AS QualificationGroup_51, 
73
  pa51.QualificationID AS QualificationID_51, 
74
  0 AS CompetencyModel, 
75
  0 AS LevelAtPlanning_51, 
76
  0 AS Gap_51, 
77
  0 AS TargetLevel_51, 
78
  0 AS ActionPlan_51, 
79
  0 AS SelfScore_51, 
80
  pa51.Notes AS Notes_51, 
81
  0 AS AppraiserScore_51, 
82
  0 AS TotalPoint_51, 
83
  0 AS LevelAfterAppraisal_51
84
FROM 
85
  dbo.PHRPA0051 pa51 
86
WHERE 
87
  pa51.EmployeeID = @empid_requester 
88
  AND pa51.AppraisalType = 'G' 
89
  AND pa51.HeaderSequence = @Sequence
90
  --AND pa51.QualificationGroup = '00000002'
(2-2/2)