M
Molasses26
I have a table where the users are supposed to input a row each month for
each account. I need some way to audit the table to make sure I have an
entry for each month in the current 12 months. The table as a field called
BillDate but if it's an account that bills near the end/beginning of the
month you might have 2 BillDates in the same month. For example 3/1/08 is the
Februay BillDate and 3/30/08 is the March BillDate. So I added a field
called BillMoYr but I'm not sure how to write the query to get the current 12
rows for each account.
In the example below I would like to be able to look at the rows below the
line and say "Yes, there is a row for each month on this account." Or beter
yet just get a list of the accounts where there is NOT a row for each month
on the account.
Table:
ACCT BILLDATE BILLMoYr COMMENT
335148 08/29/2006 09/2006 Yes
335148 09/29/2006 10/2006 Yes
335148 10/30/2006 11/2006 Yes
335148 12/01/2006 12/2006 Yes
335148 01/03/2007 01/2007 Yes
335148 02/02/2007 02/2007 Yes
335148 03/02/2007 03/2007 Yes
---------------------------------------------------------
335148 04/02/2007 04/2007 Yes
335148 05/02/2007 05/2007 Yes
335148 06/01/2007 06/2007 Yes
335148 07/02/2007 07/2007 Yes
335148 08/01/2007 08/2007 Yes
335148 08/30/2007 09/2007 Yes
335148 10/01/2007 10/2007 Yes
335148 10/30/2007 11/2007 Yes
335148 12/03/2007 12/2007 Yes
335148 01/03/2008 01/2008 Yes
335148 02/04/2008 02/2008 Yes
335148 03/04/2008 03/2008 Yes
each account. I need some way to audit the table to make sure I have an
entry for each month in the current 12 months. The table as a field called
BillDate but if it's an account that bills near the end/beginning of the
month you might have 2 BillDates in the same month. For example 3/1/08 is the
Februay BillDate and 3/30/08 is the March BillDate. So I added a field
called BillMoYr but I'm not sure how to write the query to get the current 12
rows for each account.
In the example below I would like to be able to look at the rows below the
line and say "Yes, there is a row for each month on this account." Or beter
yet just get a list of the accounts where there is NOT a row for each month
on the account.
Table:
ACCT BILLDATE BILLMoYr COMMENT
335148 08/29/2006 09/2006 Yes
335148 09/29/2006 10/2006 Yes
335148 10/30/2006 11/2006 Yes
335148 12/01/2006 12/2006 Yes
335148 01/03/2007 01/2007 Yes
335148 02/02/2007 02/2007 Yes
335148 03/02/2007 03/2007 Yes
---------------------------------------------------------
335148 04/02/2007 04/2007 Yes
335148 05/02/2007 05/2007 Yes
335148 06/01/2007 06/2007 Yes
335148 07/02/2007 07/2007 Yes
335148 08/01/2007 08/2007 Yes
335148 08/30/2007 09/2007 Yes
335148 10/01/2007 10/2007 Yes
335148 10/30/2007 11/2007 Yes
335148 12/03/2007 12/2007 Yes
335148 01/03/2008 01/2008 Yes
335148 02/04/2008 02/2008 Yes
335148 03/04/2008 03/2008 Yes