Home > database >  History of inventory everyone how to do?
History of inventory everyone how to do?

Time:09-30

Recently a warehouse management system, consult everybody, historical stock how to implement?
1, every time the inventory table data imported into the history of library table??
2, everyone to update the stock what way? Keep a single list of goods and then the data window for ins and outs of strips out updates to the database in the update SQL statements. This way safe? Sudden power outages or what will update only a part of the inventory? Or write a stored procedure to update?

CodePudding user response:

In my opinion:

1. At the end of each month for a second month knot records inventory data, as the historical records; Save the inventory history data volume is too big worry about every day to database performance variation,

2. Can save several GRN, according to the 'inventory' update inventory, if the update is not successful is rolled back,

CodePudding user response:

Inventory can be according to your input documents generated automatically,

Can be put into the Treasury, outbound, allocate, inventory of what data in a table, beginning inventory is put another table,
So good operation,

Is written to calculate inventory stored procedure is a little trouble, but the train of thought, the safety of data is very high

CodePudding user response:

Agree with the first floor, also is not necessarily the monthly statement, like when node let administrator himself

CodePudding user response:

Enters sells saves the also is such an approach.

CodePudding user response:

refer to the original poster Darren_xu posts:
recently do a warehouse management system, consult everybody, historical stock how to implement?
1, every time the inventory table data imported into the history of library table??
2, everyone to update the stock what way? Keep a single list of goods and then the data window for ins and outs of strips out updates to the database in the update SQL statements. This way safe? Sudden power outages or what will update only a part of the inventory? Or write a stored procedure to update?

History of inventory generally there are two ways: save the historical status information or historical process information
1, every time the inventory table data imported into the history of library table?? -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- generally don't have to use such a cumbersome way of
2, everyone to update the stock what way? Keep a single list of goods and then the data window for ins and outs of strips out updates to the database in the update SQL statements. This way safe? Sudden power outages or what will update only a part of the inventory? Or write a stored procedure to update? -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - through the transaction control, this is the content of the database system is the most basic

CodePudding user response:

SOFTFUN_CSDN

Think I agree with the


Library history generally do once a month to the settlement of the documents go to the library history

CodePudding user response:

How to modify documents, inventory write history library?

CodePudding user response:

The
reference 7 floor chenzih response:
modify the documents, how to write history library inventory?

Business can not do this operation,

CodePudding user response:

1, can be saved through inventory monthly statement history information
2, when touching the modified documents, if the documents have not to carry on the monthly statement this month, can be modified, but a monthly statement is not allowed to change after monthly inventory (unless the invalid drop this month),

CodePudding user response:

"Through the transaction control, this is the most basic content database system"
This is how to control

CodePudding user response:

You can create a new database again, in the new database associated with the price of the old database system (including the sales price system and price system of purchase price), then you can be in a new database and switch is ok, the old database in the old historical data in the database, in the new database for billing, and check the new inventory,

CodePudding user response:

Every business transaction by id (since the date of the growth) fewer goods increase quantity balance quantity such records to a table, so when do you want to check the inventory has
Select goods, the balance quantity
From the table inner join (
The select Max (id) as id from the table
Where the date & lt;='XXXX - XX - XX'
Group by goods) on the table. "id=Anderson d
Is this table data

CodePudding user response:

Every one want to different, someone is using the documents together

CodePudding user response:

The
references to the tenth floor builderwfy response:
"through the transaction control, this is the most basic content database system"
How is this specific control


The sqlca. The autocommit=false

When working on the insert, update, delete note commit, rollback when error;
Note that the code note database deadlock,

CodePudding user response:

Write a program, the server some time automatically tidy it up in the evening.

CodePudding user response:

For large tables, there are several kinds of methods:
Can increase the history table 1. In general, the timing will be filed in the production of table data, if you need to query the history table data, the application will have to work harder, in SQL statements, complicated business not good, update also is not very good,
2. If this is the oracle database, can consider to use the partition table, SQL SERVER 2005 above seemed to have the partition table,
3. To optimize your index can improve performance,

CodePudding user response:

Is like this, I do a water table, do the stored procedure to add and subtract inventory and login water table.
Under the multi-user rarely data problems.

CodePudding user response:

I do it, and put in storage table, outbound table, the original inventory into the warehouse table, the original inventory + inbound and outbound=inventory, so inventory table is a view, no update, as long as the warehouse is successful, inventory list is automatically updated

CodePudding user response:

I do it, and put in storage table, outbound table, the original inventory into the warehouse table, the original inventory + inbound and outbound=inventory, so inventory table is a view, no update, as long as the warehouse is successful, inventory list is automatically updated
  • Related