Hi all,
I have an output from data base which is 1,2,3…n etc. and i want to add +1 increment to write it back in database. Like the out put value of JOB_ID is 5 i want to insert it 6 when the JOB insert the other details in DB. Last JOB RUN JOB_ID is 5, but next must be 6 how to add +1 in last job_ID.
Hey @connect360
You can use ‘For each row in Datatable’ Activity to iterate through each row.
Then inside the For each Row, you can use the assign statement in this fashion
Assign Currentrow(“Column Name”)= CInt(Currentrow(“Column Name”))+1
Hi @connect360
- Retrieve the last JOB_ID from the database and store it in a variable, let’s call it
lastJobId
. - Assign: newJobId = lastJobId + 1
- Insert Data into the Database
Insert into YourTable (JOB_ID, OtherColumn1, OtherColumn2, …)
Values (newJobId, Value1, Value2, …)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.