B
Bdavis
I almost got there based on a post from Duane a while back but I'm hitting
the wall.
What I need to do is creat a field in my query that creates a sequence
number that resets on each new day [dtPost] based on the sort order of the
query.
Then, I want to take the result and, if the sequence number is even,
subtract 1. This, I think, will provide me with a query generated field that
will allow me to group debits with credits in this table. The SQL so far is
below:
SELECT psq_GLArchive.sCliNum, psq_GLArchive.sCoNum, psq_GLArchive.sLoanNum,
psq_GLArchive.dtPost, psq_GLArchive.sAssignNum, psq_GLArchive.sCollectNum,
[cCreditAmt]+[cDebitAmt] AS Amount, psq_GLArchive.sCurCode,
psq_GLArchive.dtAsOf, psq_GLArchive.sGLAcctNum, psq_GLArchive.sAcctTyFlg,
psq_GLArchive.cDebitAmt, psq_GLArchive.cCreditAmt, psq_GLArchive.dtLstUpd
FROM psq_GLArchive
ORDER BY psq_GLArchive.sCliNum, psq_GLArchive.sCoNum,
psq_GLArchive.sLoanNum, psq_GLArchive.dtPost DESC , psq_GLArchive.sAssignNum,
psq_GLArchive.sCollectNum, [cCreditAmt]+[cDebitAmt];
the wall.
What I need to do is creat a field in my query that creates a sequence
number that resets on each new day [dtPost] based on the sort order of the
query.
Then, I want to take the result and, if the sequence number is even,
subtract 1. This, I think, will provide me with a query generated field that
will allow me to group debits with credits in this table. The SQL so far is
below:
SELECT psq_GLArchive.sCliNum, psq_GLArchive.sCoNum, psq_GLArchive.sLoanNum,
psq_GLArchive.dtPost, psq_GLArchive.sAssignNum, psq_GLArchive.sCollectNum,
[cCreditAmt]+[cDebitAmt] AS Amount, psq_GLArchive.sCurCode,
psq_GLArchive.dtAsOf, psq_GLArchive.sGLAcctNum, psq_GLArchive.sAcctTyFlg,
psq_GLArchive.cDebitAmt, psq_GLArchive.cCreditAmt, psq_GLArchive.dtLstUpd
FROM psq_GLArchive
ORDER BY psq_GLArchive.sCliNum, psq_GLArchive.sCoNum,
psq_GLArchive.sLoanNum, psq_GLArchive.dtPost DESC , psq_GLArchive.sAssignNum,
psq_GLArchive.sCollectNum, [cCreditAmt]+[cDebitAmt];