Make your own free website on Tripod.com

Объектно-реляционная БД Ultima-S

Описание макросов для формирования триггера поддержания таблицы сальдо

 

ACC_EX_WHERE=where T.UDN=Acc.UDN or T.UDN=-Acc.UDN

INS_TOT_SELECT=select isnull(max(

INSTOT_WHERE= ABS_A_UX _XS.u1=(select max(_XS.u1) from inserted T, _XS where ABS_A_UX _XS.u1<T.u1)

DSEL1=from deleted T where AC1_UX_UX1

ISEL1=from inserted T where AC1_UX_UX1

DSEL2=from deleted T where AC2_UX_UX1

ISEL2=from inserted T where AC2_UX_UX1

ISELTOTAL1=from inserted T where AC1_UX_UXTOTAL1

DSELTOTAL1=from deleted T where AC1_UX_UXTOTAL1

ISELTOTAL2=from inserted T where AC2_UX_UXTOTAL1

DSELTOTAL2=from deleted T where AC2_UX_UXTOTAL1

ABS_SEL=from inserted T where ABS_AC_UX_UX1

AC1_UX_UX1=ACWHERE UXWHERE U1XWHERE

AC2_UX_UX1=ADWHERE UXWHERE U1XWHERE

AC1_UX_UXTOTAL1=ACWHERE UXWHERE U1TOTALWHERE

AC2_UX_UXTOTAL1=ADWHERE UXWHERE U1TOTALWHERE

ABS_A_UX_UX1=ABS_A_UX U1XWHERE

BUG_A_UX_UX1=BUG_A_UX U1XWHERE

ABS_A_UX=ABS_AWHERE UXWHERE

BUG_A_UX=BUG_AWHERE UXWHERE

UXWHERE= and T.u2=_XS.u2 and T.u3=_XS.u3 and T.u4=_XS.u4 and T.u5=_XS.u5 and T.u6=_XS.u6 and T.u7=_XS.u7 and T.u8=_XS.u8 and

SELECTD1= select distinct _XS.UDN, _XSFLD

SELECTT1= select T.UDN, TFLD

SELECTI1= select distinct abs(I.UDN), IFLD

SELECTIT1= select distinct abs(T.UDN), TFLD

SELECTIBUG1= select distinct -abs(I.UDN), IFLD

SELECTD2= select distinct _XS.UDN, _XSFLD

SELECTT2= select - T.UDN, TFLD

SELECTI2= select distinct - I.UDN, IFLD

_XSFLD= _XS.u1,_XS.u2, _XS.u3, _XS.u4, _XS.u5, _XS.u6, _XS.u7, _XS.u8

TFLD=T.u1, T.u2, T.u3, T.u4, T.u5 , T.u6 , T.u7 , T.u8

IFLD=I.u1, I.u2, I.u3, I.u4, I.u5, I.u6, I.u7, I.u8

XFLD= UDN, u1, u2, u3, u4, u5, u6, u7, u8, ic, id, sd, sc, ict, ist,

ACWHERE= T.UDN=_XS.UDN

ADWHERE= T.UDN= - _XS.UDN

ABS_AWHERE= abs(T.UDN)= _XS.UDN

BUG_AWHERE= abs(T.UDN)= - _XS.UDN

U1XWHERE= T.u1=_XS.u1

U1TOTALWHERE= T.u1<=_XS.u1

_XS= Saldo