SeqID : Unique Auto generate column Name : Any arbitary name SortNo : Index order in which the name is to be shown
From my code i get all the list and with some logic, i regenerate all the sort numbers again which should be unique. lets say my required output is SeqID Name SortNo 1 Test1 0 2 Test2 1 3 Test3 2 4 Test4 3 5 Test5 4 6 Test6 5 7 Test7 6
--- How can i update all the sort no value in the table . Do i need to loop each record and update ? Or can i first update all the records and then finally commit the updated transaction.
SortNo as mentioned is the index or the order according to which the Name column is to be displayed in the front end GUI list view. For further detail info, i have one more column as Value .
The work i need to do is like this.. Originally let Database name : DatabaseVer1 MyTable has only these data SeqID Name SortNo Value 1 Test1 0 2 2 Test2 1 4 3 Test3 2 6
Then from one more similar table of database named : DatabaseVer2 , there is similar table MyTable with the data as follows SeqID Name SortNo Value 1 Test4 0 8 2 Test5 1 10 3 Test6 2 12 4 Test7 3 14
Now i need to copy the data from databaseVer1 MyTable to DatabaseVer2 MyTable. With some merging logic i have copied the data whose result is shown in the above post. SeqID Name SortNo Value 1 Test1 0 2 2 Test2 1 4 3 Test3 2 6 4 Test4 0 8 5 Test5 1 10 6 Test6 2 12 7 Test7 3 14
After merging data, i once again retrived all those data and on the basis of Value column, i once again calculated the new SortNo. with some sorting algorithm. After getting the desired sortNo values, i want to now update this value in the table. So, can i do the update in bulk or do i need to carry out the update for each record row.