I've not studied Python but took a guess at it according to what other programs do. Of course, that was incorrect because Python does it based on a different paradigm. From other QOD answers I've seen, I'm not so sure I want to learn it.
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row. First step towards the paradigm shift of writing Set Based code: ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
"If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
"Change is inevitable... change for the better is not." Helpful Links: How to post code problems How to Post Performance Problems Create a Tally Function (fnTally)