"localhost:/firebird/data/ILICHEVSK2.FDB". Процедуры Previous topic Chapter index Next topic

DEVIATION_DETAILED

 

Входные параметры

Параметр

Тип

Описание

INVOICEID

INTEGER

 

 

Выходные параметры

Параметр

Тип

Описание

DEVIATIONTYPENAME

VARCHAR(50)

 

DEVIATIONDATETIME

TIMESTAMP

 

PERMITDATETIME

TIMESTAMP

 

PERMITUSERNAME

VARCHAR(33)

 

CONFIRMDATETIME

TIMESTAMP

 

CONFIRMUSERNAME

VARCHAR(33)

 

DEVIATIONSTATE

SMALLINT

 

 

Описание

(Нет описания для процедуры DEVIATION_DETAILED)

 

Определение

CREATE PROCEDURE DEVIATION_DETAILED(
    INVOICEID INTEGER)
RETURNS (
    DEVIATIONTYPENAME VARCHAR(50),
    DEVIATIONDATETIME TIMESTAMP,
    PERMITDATETIME TIMESTAMP,
    PERMITUSERNAME VARCHAR(33),
    CONFIRMDATETIME TIMESTAMP,
    CONFIRMUSERNAME VARCHAR(33),
    DEVIATIONSTATE SMALLINT)
AS
begin
  for
    select DEVIATIONTYPE.DEVIATIONTYPENAME, DEVIATION.DEVIATIONDATETIME,
        DEVIATION.PERMITDATETIME, coalesce(substring(PERMITUSER.USERNAME from 1 for 1) || '.','') || PERMITUSER.USERLASTNAME,
        DEVIATION.CONFIRMDATETIME, coalesce(substring(CONFIRMUSER.USERNAME from 1 for 1) || '.','') || CONFIRMUSER.USERLASTNAME,
        DEVIATION.DEVIATIONSTATE
      from DEVIATION
        left join DEVIATIONTYPE on (DEVIATIONTYPE.DEVIATIONTYPEID = DEVIATION.DEVIATIONTYPEID)
        left join USERS PERMITUSER on (PERMITUSER.USERID = DEVIATION.PERMITUSERID)
        left join USERS CONFIRMUSER on (CONFIRMUSER.USERID = DEVIATION.CONFIRMUSERID)
      where (DEVIATION.INVOICEID = :INVOICEID)
    order by DEVIATION.DEVIATIONDATETIME, DEVIATIONTYPE.DEVIATIONSUBTYPE, DEVIATION.DEVIATIONTYPEID
    into :DEVIATIONTYPENAME, :DEVIATIONDATETIME, :PERMITDATETIME, :PERMITUSERNAME,
        :CONFIRMDATETIME, :CONFIRMUSERNAME, :DEVIATIONSTATE
  do suspend;
end

 

     Previous topic Chapter index Next topic