CURSOR LOOP

  • Ed Wagner (8/5/2015)


    andrea4618 (8/5/2015)


    tom.w.brannon (8/5/2015)


    Toreador (8/5/2015)


    Didn't even notice the position outside the While loop. The fact that the variable is set to 1 on the previous line means that even if it were within the loop the answer would be the same.

    That's the way I saw it, too.

    Me three. Didn't even look at the loop.

    Yeah, I missed that too. It must be a better question than I thought. 😉 Thanks.

    Good point. Initially, I saw the case where Setting the variable is outside the loop and Print is inside the loop. It could make more sense if I put outside loop like this:

    If @BitToggle=0 Print 'Variable @BitToggle toggled'

    SET @BitToggle = 1

    Thanks,
    Naveen.
    Every thought is a cause and every condition an effect

  • Really easy. Thanks, Naveen!

  • What's this cursor thing? 😀

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (8/6/2015)


    What's this cursor thing? 😀

    It's the precursor to a pork chop launcher 😛

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply