Предмет: Информатика, автор: virus9911

Помогите пожалуйста , нужно определение или вообще хоть что-то написать про работу с переменными типа time!!!

Ответы

Автор ответа: yulechkakotova2019
0

Вот код процедуры

CREATE PROCEDURE SSH_REPORT (

tuid integer,

date_b date,

date_e date)

returns (

tdate date,

name varchar(100),

timesr time)

as

declare variable max_time time;

declare variable min_time time;

begin

max_time='00:00:00';

min_time='00:00:00';

for select r.dates from workers w

left join registry r on r.id_worker=w.id

where r.dates>=:date_b and r.dates<=:date_e and r.id_worker=:tuid

into:tdate

do

begin

select max(r.times) from registry r

where r.dates=:tdate and r.id_worker=:tuid

into:max_time;

select min(r.times) from registry r

where r.dates=:tdate and r.id_worker=:tuid

into:min_time;

if (:max_time<>:min_time) then timesr=:max_time-:min_time;

if (:max_time=:min_time) then timesr=:max_time;

end

suspend;

end

Похожие вопросы
Предмет: Русский язык, автор: arseniypopov07