[Emerald] SQL Querry Assistance

Michael Whisenant ( (no email) )
Thu, 4 Mar 1999 12:00:40 -0600

I am trying to isolate a beginning AR balance as of a given date. To
accomplish this I have the intital querry that is:

Select * from Invoices
Where StartDate > '11/30/98' and StartDate < '1/1/99' and Type <> 'Void'

This gives me all invoices for the period of December 1999. Naturally I
have a nice listing of all invoices on a monthly basis that cover the
December 1998 timeperiod. These start in March of 1998 and run through the
normal expected dates. Now what I am searching for is on these customer ID's
has a payment been made since the Invoices.Date? and was this payment made
before 12/28/98? I do not want to manually perform this task. I have
investigate the HAVING clause, but have not devised a successful query.

The result would output a list of invoices that covered the December
timeperiod that was not paid as of 12/28/98. I would prefer this to have
from the Master Account the FirstName, LastName, CustomerID, InvoiceID,

I would take any result that provided me a listing of InvoiceID,
CustomerID, cause then I could manually add the other two if needed.

For more information about this list, including removal,
please see http://www.iea-software.com/maillist.html