Contoh
SELECT userid
,NIK
,NAMA
,checktime
,(CASE
WHEN verifycode = 0 THEN 'C/Masuk'
ELSE 'C/Keluar'
END ) as verifycodea
,(CASE
WHEN verifycode = 0 THEN ''
ELSE ''
END ) as verifycodee
,keterangan
,status
,(CASE
WHEN machinenumber = '10.10.10.207' THEN 'NS-CL'
WHEN machinenumber = '10.10.12.249' THEN 'NS-CL'
ELSE 'SMK'
END ) as lokasin
FROM checkinout
Tidak ada komentar:
Posting Komentar