Disorder rows after import | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Disorder rows after import

Hi, after my import of txt file my rows are disorder in destination table. Text file has many rows – 70 000. I want to do it into DTS. What about this problem [?] Could you help me please ? <img src=’/community/emoticons/emotion-41.gif’ alt=’:eek:‘ /> <br /><br />Thanks, lubo
what do you mean by disorder? are there any records missing ?

I might repeat an old litany now, but there is no such thing as an order in a table. If you mean, that the order of the data in the text file does not meet the order of the rows in your table, have you tried querying with an ORDER BY clause? What is your table structure look like? Do you maybe have a sequential key like the IDENTITY property? And, probably mot important, why is the order important to you anyway? —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

I need hold order of rows in the table as an import file. In this case it means for example the 101st row in import table is on row 70360 etc in the table. It isn’t OK. I need hold row by row in table same as in import text file.
In import file is not field for ordering.
Lubo
As frank said, what is the importacne of the order. to keep the exact order you may have to introduce new column o fidentity table
I found the problem. My file hasn’t fixed structure , there is some header etc. Other way is import XML files . It is imported by other application. Do I need instal SService Pack 3 for SQL Server 2000 ? Now I haven’t it installed. Thanks , Lubo
Hi,
As Frank and Dinesh said in above post their’s no mean to store it exactly in the same order bcoz with use of ordery by clause you can acheive this. and you can install service pack 3a , and now service pack 4 for sql server is released. but try sql server service pack 4 on production server befor installing it on live server.
Regards. hsGoswami
[email protected]
]]>