jacktripper
Programmer
Well, I'm not a complete noob with stored procedures, but it is certainly not my strong point...
I have two tables of employee data that want to combine parts of them together. How can I write a stored procedure that steps through and selects data from one table, and then updates the appropriate data in the other?
Basically what the stored proc to do is:
SELECT employeeID, field1, field2, field3 FROM table1
CombinedFields = field1 + field2 + field3
UPDATE table2 SET NewField = CombinedFields WHERE table2.employeeID = employeeID
And do the above for each row in the table...
Thanks in advance for any ideas...!