Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.4 kB
4
Indexable
Never
SELECT
	`kar`.`id_karyawan` AS `id_karyawan`,
	`kar`.`kode_sid` AS `kode_sid`,
	`kar`.`nama_karyawan` AS `nama_karyawan`,
	`kar`.`perusahaan` AS `perusahaan`,
	`kar`.`Jabatan_Fungsional` AS `jabatan_fungsional`,
	`kar`.`site` AS `site`,
	`kar`.`id_sop` AS `id_sop`,
	`kar`.`nama_sop` AS `nama_sop`,
	`kar`.`work_permit` AS `work_permit`,(
	CASE
			
			WHEN ( `kar`.`id_working_type` = 69 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 159 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 38 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 77 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 78 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 79 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 39 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 25 ) THEN
			'PLANT' 
			WHEN ( `kar`.`id_working_type` = 34 ) THEN
			'DRIVER' 
			WHEN ( `kar`.`id_working_type` = 35 ) THEN
			'DRIVER' 
			WHEN ( `kar`.`id_working_type` = 36 ) THEN
			'DRIVER' 
			WHEN ( `kar`.`id_working_type` = 161 ) THEN
			'DRIVER' 
			WHEN ( `kar`.`id_working_type` = 7 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 9 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 12 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 14 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 16 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 23 ) THEN
			'TAMBANG' 
			WHEN ( `kar`.`id_working_type` = 24 ) THEN
			'TAMBANG' ELSE 'UMUM' 
		END 
			) AS `Mapping`,(
		CASE
				
				WHEN ( `kar`.`id_sop` = 76436 ) THEN
				'PLANT' 
				WHEN ( `kar`.`id_sop` = 76439 ) THEN
				'PLANT' 
				WHEN ( `kar`.`id_sop` = 76444 ) THEN
				'PLANT' 
				WHEN ( `kar`.`id_sop` = 76443 ) THEN
				'DRIVER' 
				WHEN ( `kar`.`id_sop` = 76430 ) THEN
				'DRIVER' 
				WHEN ( `kar`.`id_sop` = 76441 ) THEN
				'DRIVER' 
				WHEN ( `kar`.`id_sop` = 76435 ) THEN
				'TAMBANG' 
				WHEN ( `kar`.`id_sop` = 76440 ) THEN
				'TAMBANG' 
				WHEN ( `kar`.`id_sop` = 76429 ) THEN
				'TAMBANG' 
				WHEN ( `kar`.`id_sop` = 76438 ) THEN
				'UMUM' 
				WHEN ( `kar`.`id_sop` = 76434 ) THEN
				'UMUM' 
				WHEN ( `kar`.`id_sop` = 76433 ) THEN
				'UMUM' 
				WHEN ( `kar`.`id_sop` = 76432 ) THEN
				'UMUM' 
				WHEN ( `kar`.`id_sop` = 76431 ) THEN
				'UMUM' ELSE 'Diluar_Mapping' 
			END 
			) AS `Mapping_Dokumen` 
	FROM
	`rafif_sosman_2` `kar`