CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2000
    Posts
    10

    Red face Maintain Original Record ordering in SQL table.

    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.

  2. #2
    Join Date
    Jan 2003
    Location
    North Carolina
    Posts
    309
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured