• vs.satheesh (12/7/2012)


    HI Still i am not getting answer.One small changes I use only one table,that table i store a values like a

    registerno

    101

    102

    103

    104

    105

    106

    107

    109

    110

    120

    121

    122

    123

    124

    125

    127

    129

    130

    I want following result like following manner

    101-107,109-110,120-125,127,129-130

    Please help me

    Actually, you got one of the best answers available and you didn't take the time to look or you'd have the problem solved by now. Please see the link that Cadavre gave you. It's one of the best answers possible because it shows you how to do this several different ways and the performance ramifications of each.

    Don't forget that this "university project" is for a grade and, I for one, expect you to do a little work on your own to earn your grade because, someday, you're going to be on someone's doorstep askig for a job. If it's for a company that I rely on for some service, then I'd really like its empoyees to know what they're doing. 😉

    --Jeff Moden


    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.

    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)