Not sure why you keep mentioning a 'loop counter' as there's no need to loop to go back more than one month. So you just need an offset to drive how many months to go back? I'd suggest you go to Ray's site (coming soon!) and click on any of his download links. Cancel that download (or add it to your...
That code would be appropriate for either a Server job or a routine, yet you've marked the post as Parallel and posted in the Parallel forum. So... are you looking for a native PX solution?
You may also want to involve your DBA when it 'hangs' to see if there are any issues on the database side, blocking locks and the like. Does it still hang if you run it on a single node? Assuming there are multiple nodes (>1) at the moment.
:idea: Don't apologize, simply don't do it. Start your own thread and link back to the other topic if you really think it would help. There you go, all done. Now you are the master of your own destiny. :wink: How about more details about your job and what it is meant to accomplish. Typically all one...