E
Ed McCloskey
Someone has sent me a text file with MS Access queries defined. The file
contains definitions of "macros" and queries. It is a syntax I have not
seen. I do not have the original Access database. Nor do I know the author
of the macros and queries. Has anyone seen this syntax? Can you explain how
to define the macro in access? Is this documented anywhere?
Macro definition
~WtdAvg{Value} Sum(Value * (a.PrinBal + a.IntTBCBal))/Sum(a.PrinBal +
a.IntTBCBal)
Query Segment Using the Defined Macro
(Partial list of columns from Select list)
.... Sum(a.PaymentAmount) as PaymentAmount,
~WtdAvg{a.NumOfPayments} as NumOfPayments,
~WtdAvg{a.RepayStatusBeginDate} as RepayStatusBeginDate,
~WtdAvg{a.OriginationDate} as OriginationDate,
~WtdAvg{a.LoanStatusEndDate} as LoanStatusEndDate,
~WtdAvg{a.RemainingTerm} as RemTerm,
~WtdAvg{a.RemIOPayment} as RemIOPayment,
~WtdAvg{a.RiskShare} as RiskShare,
~WtdAvg{a.ConsolFee_Rate} as ConsolFee_Rate,
~WtdAvg{a.DirectRepay_Eligible} as DirectRepay_Eligible,
~WtdAvg{a.GreatRewards_Eligible} as GreatRewards_Eligible,
a.InterestRate,
a.InterestRate8_10, ...
contains definitions of "macros" and queries. It is a syntax I have not
seen. I do not have the original Access database. Nor do I know the author
of the macros and queries. Has anyone seen this syntax? Can you explain how
to define the macro in access? Is this documented anywhere?
Macro definition
~WtdAvg{Value} Sum(Value * (a.PrinBal + a.IntTBCBal))/Sum(a.PrinBal +
a.IntTBCBal)
Query Segment Using the Defined Macro
(Partial list of columns from Select list)
.... Sum(a.PaymentAmount) as PaymentAmount,
~WtdAvg{a.NumOfPayments} as NumOfPayments,
~WtdAvg{a.RepayStatusBeginDate} as RepayStatusBeginDate,
~WtdAvg{a.OriginationDate} as OriginationDate,
~WtdAvg{a.LoanStatusEndDate} as LoanStatusEndDate,
~WtdAvg{a.RemainingTerm} as RemTerm,
~WtdAvg{a.RemIOPayment} as RemIOPayment,
~WtdAvg{a.RiskShare} as RiskShare,
~WtdAvg{a.ConsolFee_Rate} as ConsolFee_Rate,
~WtdAvg{a.DirectRepay_Eligible} as DirectRepay_Eligible,
~WtdAvg{a.GreatRewards_Eligible} as GreatRewards_Eligible,
a.InterestRate,
a.InterestRate8_10, ...