On 2016-03-26 11:25, Stephen Russell wrote:
Michael please eliminate the steps I think are happening just dealing with the jobs table.
- insert job row
- get pkyey back
- update masterKeyValues table
I see 3 separate sql statements involving the first table. Every time you need reference to a PKey you require 200% more code and that is in need of a refactor.
All I was suggesting is that your insert statement returns the bloody key in step one and you move onto inserting items in the same way. Sure you can iterate through all of the sub family per item one at a time before you insert the second item.
Ah, gotcha. Happy Easter my friend!