• jcelko212 32090 - Wednesday, February 21, 2018 3:23 PM

    Jeff Moden - Wednesday, February 21, 2018 2:34 PM

    jcelko212 32090 - Wednesday, February 21, 2018 2:06 PM

    Where is the DDL that enforces this? I didn't see a create sequence statement anywhere. I did not even see an IDENTITY column declared. (Which I would not like, but at least it would work). Sorry after so many decades of teaching SQL. One of the things I've learned is that you can't assume something. If you make a column insanely long, eventually someone will fill it up with an insanely long meaningless string. If you don't prohibit negative numbers, someone will order -500 widgets. Etc. it is important to make people think of a declarative language in terms of, well, let's go and say it, declarations. Once upon a time, I had a client tell me "yeah, but everybody knows that!" And I had to tell him that the optimizer sure as hell didn't.since rows have no ordering whatsoever in RDBMS, the whole concept of “consecutive†has no meaning. You can talk about groups and a count (cardinality) of a group.

    Absolute garbage, Joe.  I'll agree that there is no guarantee of a "natural order" but the order defined by ColA (in this case) is acceptable.

    While I agree with THAT thought, the posted data is supposedly a result of a query that does impart a temporal order in ColA.  Whether that's true or not doesn't change the fact that your comment about "rows have no ordering whatsoever in RDBMS" is logically incorrect.

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