Re: Row Order

From: Guadala Harry (GMan_at_NoSpam.com)
Date: 11/02/04


Date: Tue, 2 Nov 2004 11:25:01 -0800

Okay, the truth is that I see the world in terms of sequential I/O. Don't
laugh - this is progress for me - I just graduated from seeing it in terms
of punch cards. I'm just trying to emplement a punch card database that was
morphed into a flat-file design into SQL Server. The trouble is that SQL
Server is a relational database that assumes set operations and doesn't let
me easily loop through my RECORDS. Every night I thank god for cursors and
that some brilliant person at Microsoft had the foresight to include the
WHILE looping construct - as these are by "bread and butter" tools for
implementing my grand visions of "conceptual reel-to-reel tapes" whizzing
through their RECORDS in my SQL Server database. If only I could have two
IDENTITY columns in each file (I mean table) - one incrementing up from zero
and the other simultaneously decrementing down from an arbitrarily set
integer value. Perhaps Yukon will bail me out on that one...

-GH

"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:uZ7fRlQwEHA.3336@TK2MSFTNGP11.phx.gbl...
> > Order inside the table is not guaranteed. However, order in the result
> set
> > of a query can be - with an ORDER BY. Why is it that you "need for the
> rows
> > to exist in the temp table in the order specified by the ORDER BY
clause"?
>
> My guess is that a cursor then operates against the #temp table, and
> somebody doesn't want to have to add an ORDER BY clause to the cursor
> definition. :-)
>
>