I finally got my call to a stored procedure on our db2 to work. However i might have to change what the stored procedure does, if I cannot get it to work how we want. Which i would like to make it work on the sql server side, and not have to change the db2 side as that takes some time from our developers.
But this is what i want to do. I have a stored procedure that calls the db2 stored procedure to return 4 leave amounts(@Annual , @Sick, @Family, @Other). @EmployeeID is the identifier to pull the appropriate record.
I have created a query to use the returned values and update the record in my database table(Maintbl).
So my question is is there a way to loop through all records in the database table, that would query the db2 stored procedure and then update the Maintbl table?
I have the query to update, but i have to specify the EmployeeID each time i run it. Just need away to loop through and then turn it into a nightly job to run, but looping through is the first step.
EmployeeID's are not sequential, random integers from 1 digit to 6 digits.
Help or suggestions?
Thank you.
But this is what i want to do. I have a stored procedure that calls the db2 stored procedure to return 4 leave amounts(@Annual , @Sick, @Family, @Other). @EmployeeID is the identifier to pull the appropriate record.
I have created a query to use the returned values and update the record in my database table(Maintbl).
So my question is is there a way to loop through all records in the database table, that would query the db2 stored procedure and then update the Maintbl table?
I have the query to update, but i have to specify the EmployeeID each time i run it. Just need away to loop through and then turn it into a nightly job to run, but looping through is the first step.
EmployeeID's are not sequential, random integers from 1 digit to 6 digits.
Help or suggestions?
Thank you.
Comment