Реферат: MIDAS. Практическое применение

where DOC_DATE >= :FROM_DATE and DOC_DATE <= :TO_DATE

into :DOC_ID, :DOC_NUM, :DOC_DATE, :FROM_ID, :TO_ID, :DOC_SUM

do begin

FROM_NAME = NULL;

TO_NAME = NULL;

execute procedure CLIENT_FULL_NAME (:FROM_ID)

returning_values :FROM_NAME;

execute procedure CLIENT_FULL_NAME (:TO_ID)

returning_values :TO_NAME;

suspend;

end

end

Осталась процедура для отчета:

create procedure REP_INOUT(FROM_DATE date, TO_DATE date)

returns (FROM_ID integer, FROM_NAME varchar(180), TO_ID integer, TO_NAME varchar(180),

FULL_SUM numeric(15,4))

as

begin

for select FROM_ID, TO_ID, sum(DOC_SUM)

from DOC_TITLE

where DOC_DATE >= :FROM_DATE and DOC_DATE <= :TO_DATE

group by FROM_ID, TO_ID

into :FROM_ID, :TO_ID, :FULL_SUM

do begin

FROM_NAME = NULL;

TO_NAME = NULL;

select NAME

from client

where CLIENT_ID = :FROM_ID

К-во Просмотров: 827
Бесплатно скачать Реферат: MIDAS. Практическое применение