I have a customer table that I need to update with the spending of the previous month. The query should sum tbinvoice.numTotal for each client and that value should be used to update the client table.
Assuming last month was November, this is as far as I have been able to go:
UPDATE tbCustomer SET tbCustomer.numCurrentSpend = (SELECT SUM (tbInvoice.numTotal) as NumT FROM tbInvoice WHERE ((tbInvoice.lngMonth)=10 AND tbInvoice.numID =tbCustomer.numID))
This produces a missing operator message.
Thanks for any assistance.