J
Jonas
I want to create a query that calculates the percentage of a total and
multiplies each percentage times a single number that is stored in a
table. Here is what I have so far:
SELECT AmortSchedule.AmtBorUniqueID, Sum(39000*([AmtPrincPayAmount]/
(SELECT Sum(AmortSchedule.AmtPrincPayAmount) AS SumOfAmtPrincPayAmount
FROM AmortSchedule
WHERE (((AmortSchedule.AmtPayDate)>=#2/1/2010#))))) AS BorTrustFee2
FROM AmortSchedule
WHERE (((AmortSchedule.AmtPayDate)>=#2/1/2010#))
GROUP BY AmortSchedule.AmtBorUniqueID;
I have tried to repace the number 39,000 with a query but I just get
an error message. Should I just use variables for 39,000 and the
number that results from the subquery? Below is a description of what
I want to achieve.
percantage of total equal to or after 2/1/10 times some number
multiplies each percentage times a single number that is stored in a
table. Here is what I have so far:
SELECT AmortSchedule.AmtBorUniqueID, Sum(39000*([AmtPrincPayAmount]/
(SELECT Sum(AmortSchedule.AmtPrincPayAmount) AS SumOfAmtPrincPayAmount
FROM AmortSchedule
WHERE (((AmortSchedule.AmtPayDate)>=#2/1/2010#))))) AS BorTrustFee2
FROM AmortSchedule
WHERE (((AmortSchedule.AmtPayDate)>=#2/1/2010#))
GROUP BY AmortSchedule.AmtBorUniqueID;
I have tried to repace the number 39,000 with a query but I just get
an error message. Should I just use variables for 39,000 and the
number that results from the subquery? Below is a description of what
I want to achieve.
percantage of total equal to or after 2/1/10 times some number