Project

General

Profile

Bug #1327 » PRPTCMMERITHEAD_20220713.sql

Tri Rizqiaty, 07/20/2022 09:43 AM

 
1
??USE [MinovaES_BankKalteng_Dev]
2

3
GO
4

5
/****** Object:  StoredProcedure [dbo].[PRPTCMMERITHEAD]    Script Date: 13/07/2022 10.17.33 ******/
6

7
SET ANSI_NULLS ON
8

9
GO
10

11
SET QUOTED_IDENTIFIER ON
12

13
GO
14

15
ALTER PROCEDURE [dbo].[PRPTCMMERITHEAD]
16

17
(
18

19
  @Version varchar(8),
20

21
  @CompanyID varchar(8),
22

23
  @Year varchar(8),
24

25
  @CostCenter varchar(8),
26

27
  @Organization varchar(8),
28

29
  @EmployeeIDFrom varchar(8),
30

31
  @EmployeeIDTo varchar(8)
32

33
)
34

35
AS
36

37

38

39
--DECLARE @CompanyID varchar(8)
40

41
--DECLARE @Version varchar(8)
42

43
--DECLARE @Year varchar(8)
44

45
--DECLARE @CostCenter varchar(8)
46

47
--DECLARE @Organization varchar(8)
48

49
--DECLARE @EmployeeIDFrom varchar(8)
50

51
--DECLARE @EmployeeIDTo varchar(8)
52

53
--SET @Version = '0011'
54

55
--SET @CompanyID = '1000'
56

57
--SET @Year = '2022'
58

59
--SET @CostCenter = ''
60

61
--SET @Organization = ''
62

63
--SET @EmployeeIDFrom = ''
64

65
--SET @EmployeeIDTo = ''
66

67

68

69

70

71
SELECT TOP(1) COM.* ,
72

73
        ISNULL(CAT.FileData, 0) AS Value
74

75
		,@year AS period
76

77
FROM    dbo.PCMEPCOMPID COM
78

79
LEFT JOIN dbo.SFILECATALOG CAT ON COM.Logo = CAT.FileName
80

81
WHERE (com.CompanyID = @CompanyID OR @CompanyID = '')
82

83

84

85

86

87

(15-15/17)