I'm trying to find an easier way of doing the following: We have a batch file that processes records into two tables, position, and position_detail. I'm trying to make a copy of the records entered, giving them new keys, update_date, and update_source columns. I've got it working using cursors with a few columns, but I need to get all of the columns for each table and one of the tables has almost 100 columns, so the cursor seemed to be getting huge.
The added hitch is that the tables don't have autoincrementing for their pks, they have a stored proc they call to get the new id, and it gets recorded in another table.
Here's the stored proc I have written that works pretty well, it's just going to get super unwieldy when I explode the cursor out to 100 fields.
*had to take out the stored proc for work*