Cursor

  • Spot on, Gus. 🙂

    --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)

  • Simon,

    I wonder if you'd do me a favor... I realize it's been about 4 months since the last post, but I need to ask... why did you need to do this? I mean, what is the business reason for doing this? Can you explain please?

    --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)

  • Jeff Moden (1/17/2009)


    Simon,

    I wonder if you'd do me a favor... I realize it's been about 4 months since the last post, but I need to ask... why did you need to do this? I mean, what is the business reason for doing this? Can you explain please?

    Here is a sample of posts that, IMHO, are all similar in nature. They all imply finding a rank (ie. a dense rank) that form groups not explicitly defined by the data. Perhaps you'll find what your looking for among them. There are actually tons of these posts but users struggle with describing them in the subject so they remain elusive as does an agreed upon solution:)

    T-SQL Black Belt

    'Identifying Sections'

    By:Itzik Ben-Gan

    http://www.sqlmag.com/Article/ArticleID/95912/sql_server_95912.html

    microsoft.public.sqlserver.programming

    Jul 5 1999

    'Difficult SQL Question'

    http://tinyurl.com/367db2

    microsoft.public.sqlserver.programming

    Jun 11 2001

    'SQL challenge: coelesce consecutive and overlapping bookings for a room'

    http://tinyurl.com/38ebhl

    T-SQL (SS2K5)

    'How to get start and end value from a...'

    http://www.sqlservercentral.com/Forums/Topic629528-391-1.aspx

    microsoft.public.sqlserver.programming

    Thursday, April 24, 2008

    'Quick puzzle'

    http://tinyurl.com/7wovgq

    microsoft.public.sqlserver.programming

    Thursday, September 13, 2007 2:27 PM

    'SQL Query Help: Need to remove consecutive items and just keep the earliest'

    http://tinyurl.com/7qycl5

    comp.databases.ms-sqlserver

    Sep 5, 2008 7:59 am

    'Grouping similar rows'

    http://tinyurl.com/3378lk

    www.beyondsql.blogspot.com

  • rog pike (1/17/2009)


    Jeff Moden (1/17/2009)


    Simon,

    I wonder if you'd do me a favor... I realize it's been about 4 months since the last post, but I need to ask... why did you need to do this? I mean, what is the business reason for doing this? Can you explain please?

    Here is a sample of posts that, IMHO, are all similar in nature. They all imply finding a rank (ie. a dense rank) that form groups not explicitly defined by the data. Perhaps you'll find what your looking for among them. There are actually tons of these posts but users struggle with describing them in the subject so they remain elusive as does an agreed upon solution:)

    T-SQL Black Belt

    'Identifying Sections'

    By:Itzik Ben-Gan

    http://www.sqlmag.com/Article/ArticleID/95912/sql_server_95912.html

    microsoft.public.sqlserver.programming

    Jul 5 1999

    'Difficult SQL Question'

    http://tinyurl.com/367db2

    microsoft.public.sqlserver.programming

    Jun 11 2001

    'SQL challenge: coelesce consecutive and overlapping bookings for a room'

    http://tinyurl.com/38ebhl

    T-SQL (SS2K5)

    'How to get start and end value from a...'

    http://www.sqlservercentral.com/Forums/Topic629528-391-1.aspx

    microsoft.public.sqlserver.programming

    Thursday, April 24, 2008

    'Quick puzzle'

    http://tinyurl.com/7wovgq

    microsoft.public.sqlserver.programming

    Thursday, September 13, 2007 2:27 PM

    'SQL Query Help: Need to remove consecutive items and just keep the earliest'

    http://tinyurl.com/7qycl5

    comp.databases.ms-sqlserver

    Sep 5, 2008 7:59 am

    'Grouping similar rows'

    http://tinyurl.com/3378lk

    www.beyondsql.blogspot.com

    Not asking you... asking Simon. Those other posts means nothing for the very reason you stated.

    --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)

Viewing 4 posts - 46 through 48 (of 48 total)

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