USE [HRIS]
GO

/****** Object:  View [dbo].[IKU_KPI]    Script Date: 29/05/2023 14:31:03 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO





--ALTER VIEW [dbo].[IKU_KPI] AS 

--Select [ID_IKU] as KPI_ID,
--	'' as SAR_ID,
--	kpi as KPI,
--	'' as FORMULA ,
--	'' as SATUAN ,
--	nomor_iku ,
--	'' as POLARISASI ,
--	'' as DESKRIPSI ,
--	'' as PENJUMLAHAN_IKU,
--	1 as BOBOT ,
--	'' as DOC ,
--	'' as VALIDITAS ,
--	'' as COMPLEMENT ,
--	'' as CASCADE_FROM ,
--	'' as SUMBER_DATA ,
--	'' as TINDAKAN ,
--	'' as KONSOLIDASI_DATA,
--	'' as UNIT_PENANGGUNG_JAWAB ,
--	'' as UNIT_PENYEDIA_DATA ,
--	'' as TAHUN_IKU ,
--	1 as JNS_KANTOR ,
--	'' as IKU_PELAKSANA,
--	'' as PERIODE_PELAPORAN,
--	'' as KD_JABATAN_STR ,
--	'' as KD_JABATAN_FUNG ,
--	'' as TYPE_IKU, 
--	kode_satker as KD_UNIT_ORG
--from openquery([TO_SINIKI],
--'SELECT 
--	a.id_iku ,
--	a.kpi ,
--	a.nomor_iku ,
--	a.kode_satker
--FROM [OJK IKI].dbo.SIMPEL_IKU as a')

select 
	a.id_iku as KPI_ID,
	'' as SAR_ID,
	a.kpi as KPI,
	'' as FORMULA ,
	'' as SATUAN ,
	a.nomor_iku ,
	'' as POLARISASI ,
	'' as DESKRIPSI ,
	'' as PENJUMLAHAN_IKU,
	1 as BOBOT ,
	'' as DOC ,
	'' as VALIDITAS ,
	'' as COMPLEMENT ,
	'' as CASCADE_FROM ,
	'' as SUMBER_DATA ,
	'' as TINDAKAN ,
	'' as KONSOLIDASI_DATA,
	'' as UNIT_PENANGGUNG_JAWAB ,
	'' as UNIT_PENYEDIA_DATA ,
	'' as TAHUN_IKU ,
	1 as JNS_KANTOR ,
	'' as IKU_PELAKSANA,
	'' as PERIODE_PELAPORAN,
	'' as KD_JABATAN_STR ,
	'' as KD_JABATAN_FUNG ,
	'' as TYPE_IKU ,
	a.kode_satker as KD_UNIT_ORG
	from [OJK IKI].dbo.SIMPEL_IKU as a

--GO


SELECT  
	*
FROM  
	[OJK IKI].dbo.SIMPEL_IKU
WHERE 
	LEFT(kode_satker, 9) = '111004002'
ORDER BY 
	kpi ASC

SELECT  
	*
FROM  
	[OJK IKI].dbo.SIMPEL_IKU
WHERE 
	NAMA_SATKER LIKE '%Departemen Pelindungan Konsumen%'

SELECT
	*
FROM
	SPG_08_UNIT_ORGANISASI
WHERE
	NM_UNIT_ORG LIKE '%Direktorat Pengembangan dan Pengaturan EPK%'