• drew.allen - Friday, February 9, 2018 3:29 PM

    If you look at POID 1099563, it delivers to sites 2607 and 2608, but POID 1189651 delivers to sites 2607, 2608, and 3504.  I treated those as a break even though there is no break if you just look at sites 2607 and 2608, because that was the only way that I could get my results to match the desired results

    Drew

    That's exactly what I need to do. And yes, Lynn, it's not intuitive. In fact, I told our project manager that our data was incompatible with the requirements. But the requirements are the way it needs to be done because Reasons.

    Thanks, Drew. I'll check your code out. I toyed with the idea of using STUFF() for about 5 minutes but couldn't see how to apply it, so went on to try nested cursors and nested while loops, etc. Maybe I should have actually tried STUFF() instead of just looked at it. @=)

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.