I want to try to optimize some code by placing combining a call to a stored procedure with a SQL select statement.
The stored procedure is called taSopLineIvcInsert. I have a temporary dataset stored in SOPLINES and SOPHEADR. I am passing down the order number to another stored procedure and I want to select all the lines that belong to this order. As each line is found I then want to call the stored procedure taSopLineIvcInsert that will insert each record into the final production database. I want to do this without using a cursor. How can I restructure the attached stored procedure to accomplish this?