Auto Copy Record with recalculation function
Hi All,
I'm doing a function which can recalculate cost of product in a list. The record of list is storing at database. Since the user would like to recalculate the cost the program will copy exactly same product spec and generate a new reference number without overwrite exist data.
Hence, I had faced a problem with what is best method to reduce the time expand of transaction ?
My suggestion is using store procedure to create a view with new reference number and calculate the changed of product cost. After calculation function is done, the SPROC will copy back the new view record back to table.
it is the best solution ?
can someone provide me better way ?
thanks a lot
Re: Auto Copy Record with recalculation function
What database is this? Research bulk processing for relevant database. For Oracle, this will involve use of FORALL and BULK COLLECT features.
Re: Auto Copy Record with recalculation function
Thanks Leinad31 i'm using SQLExpress 2005 ....
Re: Auto Copy Record with recalculation function
Moved to Database Development
Re: Auto Copy Record with recalculation function
The stored procedure is a good start at least as the execution plan gets cached by SQL Server. I'm not sure what you're doing currently that's inefficient. Elaborate.