• ZZartin (11/21/2014)


    g.britton (11/21/2014)


    ScottPletcher (11/21/2014)


    You don't "have" to do the FETCH twice. In fact, I never do that, because it's too error prone when the code is changed.

    good point, though the standard examples tend to have two FETCH statements.

    /shrug it's a very intuitive way to code it, and the risk that someone might forget to update one of the fetch statements should be pretty obvious pretty fast when(hopefully) the code is tested.

    I don't find two different reads of the same data structure "intuitive", maybe that's just me.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.