G
Gwen H
I have a table that is a list of new loans opened since 1/1/2005. The fields
include the loan officer number, the account number, and the date opened. I
also have a query based on this table that sums the new loans opened since
1/1/2005 for each loan officer. In this query, the date opened field is
formatted as a date field, but I have formatted it to display the name of the
month only and named it "Month". I need this query to pull just the first two
months of the most recent quarter. In other words, when I run the query in
July it should pull totals for each loan officer for April and May only.
How do I do this in my query? I am pasting the SQL below.
SELECT Officers.[Officer#], Officers.OfficerName, Format([Issue
Date],"mmmm") AS [Month], Sum(Nz([Current Bal],0)) AS [Current Balance]
FROM Officers LEFT JOIN newLoans ON Officers.[Officer#] = newLoans.[Officer#]
GROUP BY Officers.[Officer#], Officers.OfficerName, Format([Issue
Date],"mmmm")
HAVING (((Officers.[Officer#])<9000 And (Officers.[Officer#])<>107 And
(Officers.[Officer#])<>288 And (Officers.[Officer#])<>546 And
(Officers.[Officer#])<>143))
ORDER BY Officers.[Officer#], Format([Issue Date],"mmmm");
include the loan officer number, the account number, and the date opened. I
also have a query based on this table that sums the new loans opened since
1/1/2005 for each loan officer. In this query, the date opened field is
formatted as a date field, but I have formatted it to display the name of the
month only and named it "Month". I need this query to pull just the first two
months of the most recent quarter. In other words, when I run the query in
July it should pull totals for each loan officer for April and May only.
How do I do this in my query? I am pasting the SQL below.
SELECT Officers.[Officer#], Officers.OfficerName, Format([Issue
Date],"mmmm") AS [Month], Sum(Nz([Current Bal],0)) AS [Current Balance]
FROM Officers LEFT JOIN newLoans ON Officers.[Officer#] = newLoans.[Officer#]
GROUP BY Officers.[Officer#], Officers.OfficerName, Format([Issue
Date],"mmmm")
HAVING (((Officers.[Officer#])<9000 And (Officers.[Officer#])<>107 And
(Officers.[Officer#])<>288 And (Officers.[Officer#])<>546 And
(Officers.[Officer#])<>143))
ORDER BY Officers.[Officer#], Format([Issue Date],"mmmm");