Click to See Complete Forum and Search --> : Maintain Original Record ordering in SQL table.


leonwoo
May 11th, 2003, 11:27 PM
Hi
I am facing a problem which i dont know how to solve it. Currently I have a text file that contains many rows of records and the sequence of the records in the text file is important. The sequence is base on record location priority and there is no specific field that can identify the priority. The toper a record is located the higer the priority. I want it to look exactly like when i open the file using Excel, i.e. use original record odering.

some how when I used DTS to import the data and store into a table, the table arrange the records base on unknown order and I dont want it because it is not in the sequence of the data in the file.

So when i select the table without putting any order, the results are not acceptable.

so far the only solution i can think of is to write an extra apllication to read in line by line in sequence but i dont have time.

Please help! thanks.

antares686
May 12th, 2003, 04:36 AM
Add either an identity column to the import table and not try to overwirte it. Or make sure you have a clustered index (this is the index the table is sorted on) on the column that the data was sorted by before.