I'vê got a bank that holds the entry and exit times of doctors in a hospital.
Need to get the range of these schedules 2 and offers them 30 in 30 minutes ... I don't have the slightest idea of how to do this, who can help I appreciate and ...
select data_hora_intervalo
from
(
select a.data_entrada + (b.rnum / 48)
from tabela_entrada_saida a
, (
select level rnum
from dual connect by
level <= (
select (nvl(dat_saida, sysdate) - dat_entrada) * 48
from tabela_entrada_saida
where id_medico = 1
)
) b
where a.id_medico = 1
);
Users browsing this forum: No registered users and 2 guests