• So... something more like this. Here's a real world example from my job.

    Goal: To score a set of companies based on set business rules that vary from platform to platform. The score determines priority for a selection process. Each platform has a different set of rules.

    The original solution:

    1. Open cursor

    2. Determine platform

    3. Long if block to determine score based on company information

    4. Write result

    5. Rinse repeat

    I could go over the what we used to break apart the cursor... Actually for brevity sake I simplified the "Original solution." The actual original solution was a proc that had a cursor that called itself. We called it the recursive cursor. It was lots of fun.