query for customers that have not purchased within 6 months

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to delete all but the most recent purchase date for each
customer and then query the for those dates older that 6 months
 
Why would you delete all but the most current? You can simply run a query
to find the most current (without deleting data). If you can willy-nilly
delete data like that, I guess it would make me wonder why you are bothering
to store it in the first place.

Before anyone can help you, we would need to know the structure of your
database.

In most cases, you would have some type of invoice table with a customer
number, a date, and an invoice number. You'd have another table with a
customer number and their name and addres data. You'd propbably have at
least one more table with the invoice detail lines that contain the invoice
number and a separate record for each item on the invoice.

If that is the case, you'd need to run your query off the invoice table and
then limit to only show one record (the most recent) for each vendor.

Rick B
 
Back
Top