Hello all,
This may seem like a very "dumb" question, but I decided to take the risk of being mocked & ridiculed...
I know how to perform "mass updates" in SQL, but haven't experienced the need to perform "transactional" processing - one row at a time.
I need to write a program that connects to an MS SQL 2012 server, retrieve records, recalculate the data in a field (column) & update on the MS SQL server, one row at a time.
I am able to connect to the table & read in records, utilizing the jtds driver.
The flow of the program will go something like this:
* Select records
* for each row, determine quantity available
* if calculated quantity available <> quantity available that is stored in the table row that is being processed, update quantity available
I am only reading one table, so there are no joins involved.
Any thoughts/advice?
Thanks
This may seem like a very "dumb" question, but I decided to take the risk of being mocked & ridiculed...
I know how to perform "mass updates" in SQL, but haven't experienced the need to perform "transactional" processing - one row at a time.
I need to write a program that connects to an MS SQL 2012 server, retrieve records, recalculate the data in a field (column) & update on the MS SQL server, one row at a time.
I am able to connect to the table & read in records, utilizing the jtds driver.
The flow of the program will go something like this:
* Select records
* for each row, determine quantity available
* if calculated quantity available <> quantity available that is stored in the table row that is being processed, update quantity available
I am only reading one table, so there are no joins involved.
Any thoughts/advice?
Thanks
Comment