dts imports , records added to table randomly. not sorted as in text file

  • I am looking to import 7million rows worth of data from a flat textfile. all the rows seem to be copied over but they are not arrangedlike they are in the flat file. each row in the text file is a recordand there  are no column delimiters. hence the table should have onlyon column. also note that i type in odd characters for the columndelimiter since it is require to set up the dts package.any ideas will be greatly appreciatedlet me know if you have any questionsthanks
  • The best way I know to understand a table is to picture each row of data as a marble and the table as a bucket.  Dump all 7 million marbles in the bucket.  This is your table of data. Notice there is no order on the marbles (data). 

    To see the data in order, you need to create a view on the table with an order by clause and put in the criteria you want to sort by.

    If you need to be able to pull out the data from the table in exactly the same order as your original file, you might consider putting in an ID field with a seed of 1 before you do the import.  This field will be automatically incremented by one for each record as it is imported.  Then, in your query, you can order by this ID field and return the data in the order your flat file was in.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply