SELECT EMPNAME,ZONE_NAME,
case when ATTN_IN IS NOT NULL then '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image: linear-gradient(310deg,#006516,#6fc700); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||ATTN_IN||'</span>' ELse '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image:linear-gradient(310deg,#770000,#ec2d2d); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||'00:00:00'||'</span>' end as ATTN_IN,
case when ATTN_OUT IS NOT NULL then '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image: linear-gradient(310deg,#006516,#6fc700); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||ATTN_OUT||'</span>' ELse '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image:linear-gradient(310deg,#770000,#ec2d2d); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||'00:00:00'||'</span>' end as ATTN_OUT,
SCHEDULE_ID,ACTIVITY_ID, --GET_TIME (WORKING_TIME) WORKING_TIME,
CASE WHEN WORKING_TIME IS NOT NULL THEN '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image: linear-gradient(310deg,#959595,#000000); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||GET_TIME (WORKING_TIME)||'</span>' END AS WORKING_TIME ,
case when FIRST_LOC IS NOT NULL then '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image: linear-gradient(310deg,#090065,#0016c7); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||FIRST_LOC||'</span>' ELse '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image:linear-gradient(310deg,#770000,#ec2d2d); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||'00:00:00'||'</span>' end as FIRST_LOC,
case when SECOND_LOC IS NOT NULL then '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image: linear-gradient(310deg,#797a05,#eecb0d); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||SECOND_LOC||'</span>' ELse '<span class="info" style=" text-align: center;
letter-spacing: .3px; display: inline-block;padding: 0.4rem 0.66666667rem;line-height: 1;padding-right: 0.6em;padding-left: 0.6em;background-image:linear-gradient(310deg,#770000,#ec2d2d); color: #ffffff;font-weight: bold;border: 2px solid #fffde7;
border-radius: 5px;">'||'00:00:00'||'</span>' end as SECOND_LOC
FROM TABLE_NAME;