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

Ответы 1

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

    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

    • Автор:

      pyscho
    • 6 лет назад
    • 0
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years