I use SQL Server wizard to import csv files, however the rows imported appears in different order. How can I say to SQL Server to import rows in correct order.
+2
A:
It's probably importing in the correct order, but SQL server is retrieving them in a different order. Try adding a unique column on your table and then select the rows using that as an order by.
Dayton Brown
2010-01-03 14:44:42
+4
A:
In databases there is no such thing as order of records, as opposed to numbered spreadsheet rows, you need a column to order by. You would use something like
SELECT * FROM myTable ORDER BY SomeColumn
Damir Sudarevic
2010-01-03 14:46:54
+1, but for databases, you are really meaning "relational databases" as defined by E.F. Codd, since before and since there have been databases of other kinds.
Cade Roux
2010-01-03 15:08:41