(SELECT 'diasemana' =
CASE
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 1 THEN 'Domingo'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 2 THEN 'Segunda'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 3 THEN 'Terça'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 4 THEN 'Quarta'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 5 THEN 'Quinta'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 6 THEN 'Sexta'
WHEN DATEPART(WEEKDAY, ZATENDIMENTOS.DTHENTRADA) = 7 THEN 'Sábado'
END) DIASEMANA,