![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am looking to import 7million rows worth of data from a flat text file. all the rows seem to be copied over but they are not arranged like they are in the flat file. each row in the text file is a record and there are no column delimiters. hence the table should have only on column. also note that i type in odd characters for the column delimiter since it is require to set up the dts package. any ideas will be greatly appreciated let me know if you have any questions thanks |
#3
| |||
| |||
|
|
I think this is the normal behaviour for SQL Server. Data is not guaranteed to be returned in any specific order unless you use an ORDER BY clause. You may consider something like inserting into a table with an IDENTITY value for the PK and order by that Identity value. -Pete robert_emoghene (AT) hotmail (DOT) com (rob) wrote: I am looking to import 7million rows worth of data from a flat text file. all the rows seem to be copied over but they are not arranged like they are in the flat file. each row in the text file is a record and there are no column delimiters. hence the table should have only on column. also note that i type in odd characters for the column delimiter since it is require to set up the dts package. any ideas will be greatly appreciated let me know if you have any questions thanks |
#4
| |||
| |||
|
|
"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote Peter is correct. Without an ORDER BY clause the order is _NOT_ guaranteed. Seeing as you cannot use any funky stuff on a flat file you will need to import into a staging table then from there into your proper table Allan "Peter A. Schott" <pschott (AT) no (DOT) spamm.hear.drivefinancial.com> wrote in message news:b4v5l093me7pm8s0joeu88van6jdf8oq0s (AT) 4ax (DOT) com... I think this is the normal behaviour for SQL Server. Data is not guaranteed to be returned in any specific order unless you use an ORDER BY clause. You may consider something like inserting into a table with an IDENTITY value for the PK and order by that Identity value. -Pete robert_emoghene (AT) hotmail (DOT) com (rob) wrote: I am looking to import 7million rows worth of data from a flat text file. all the rows seem to be copied over but they are not arranged like they are in the flat file. each row in the text file is a record and there are no column delimiters. hence the table should have only on column. also note that i type in odd characters for the column delimiter since it is require to set up the dts package. any ideas will be greatly appreciated let me know if you have any questions thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |