Re: natural order of seleted records

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 12:25:37 +0200

To expand a bit on Aaron's post:

Rows in SQL Server are not ordered. If you don't specify an order, SQL Server is free to return the
rows in any order it feels like. So, you need to have something in the data that defines you
"natural order" and use that when you retrieve the data, in your ORDER BY clause.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DWN" <DWN@discussions.microsoft.com> wrote in message
news:16A2E066-858D-43B4-B717-4C5089672FEA@microsoft.com...
> I have a dBase file that I'm importing to a SQL table, and I need to access those records in
sequential order.  If I open the .dbf file with Access or Excel, I get the records in sequential
order as needed.
>
> Once I import to SQL using DTS, the records are not in the same sequential order that I need them
in.  Is there any way to go from dBase to SQL and guarantee that the original natural order of the
records is maintained?
>
> Thanks,
> DWN
>


Relevant Pages

  • Re: natural order of seleted records
    ... your PICK system exports data so that some of the ... SQL Server, like most database systems, is not designed to ... The Cygwin Unix shell for Windows is useful for preprocessing files like ... >>sequential order. ...
    (microsoft.public.sqlserver.programming)
  • Re: natural order of seleted records
    ... "DWN" wrote in message ... >I have a dBase file that I'm importing to a SQL table, ... I get the records in sequential order as needed. ...
    (microsoft.public.sqlserver.programming)