MySQL Forums
Forum List  »  Newbie

Re: Copying a SUM Value
Posted by: Barry Galbraith
Date: February 27, 2023 03:23PM

If you could do this, which row in Invoices01 would you update?
The table name Invoices01 suggests to me that there will be more than one Invoices table.
Don't do that. Maybe one Invoices table, with an invoice number as Primary key.
An Items table with individual items, and a foreign key with invoice number. so you can have multiple items on one invoice.
You can then sum the prices for the items on an invoice, and update the invoice number with the total of the invoice, and the calculated tax.
That will allow prices of items to change, but the prices for this invoice will remain the same.

If that's not the type of thing you are after, them more detail of what you are trying to achieve may help.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
February 27, 2023 02:29PM
Re: Copying a SUM Value
February 27, 2023 03:23PM
February 27, 2023 03:53PM
February 27, 2023 04:06PM
February 27, 2023 06:00PM
February 27, 2023 07:12PM
February 28, 2023 05:44AM
February 28, 2023 10:08AM
March 01, 2023 09:23AM
March 01, 2023 09:34AM
March 02, 2023 05:28AM
March 02, 2023 01:43PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.