• Drew, the pattern of this data is what I think of as header/detail data. One very significant "S" row followed by a bunch of "B" rows. This wouldn't be uncommon in an old flat file system. Think order entry: one header row with buyer, ship to, bill to, information and several line-item rows with item#,price, and quantity. The OP expects us to read them one row at a time in sequence. It would be nice if they were numbered, but we still have a sequence in the ExecutionTime. I ran across another "sequential" pattern a couple of weeks back have submitted an article to Steve about it. If you want to see how to make sense out of this kind of pattern, just select * from cte2.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills