Programming :  Student Freelance Forum For Work Experience Builders' (CertificationPoint) The fastest message board... ever.
 
Updating Stock for each stock receipt
Posted by: adcertpoint (Moderator)
Date: July 22, 2021 06:57PM

I have a SQL Server 2014 Express (v12) where items are added to stock using a receipt module and quantities are added in multiple receipts over time. Now, when these items are consumed, the stock needs to be updated for each receipt (oldest receipt first), not at the sum level.

As of now, I am using a cursor to iterate through the receipts where stock is available in the chronological order and keep updating stock as I keep consuming.

Is there a better way of implementing this?

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.