all groups > sql server dts > june 2006 >
You're in the

sql server dts

group:

Transfer record sequence


Transfer record sequence sheridan.zhu NO[at]SPAM gmail.com
6/28/2006 2:12:05 PM
sql server dts:
I'm using DTS to process a text file in SQL Server and then exporting
it back out as a text file.

I first create a table in SQL Server, then import the text file into
that table. I need the file in its orginal sequence as it goes in and
out of the SEQ Server. However, sometimes, the file is not maintaining
its sequence, in which case I will have to hit Transform Data Task
twice (double import the file) and then run the whole package again.
It works every time!

Why does this happen? Is there a way not to manually intervene?

Thanks in advance.

Sheridan
Re: Transfer record sequence Allan Mitchell
7/1/2006 3:34:53 AM
Hello sheridan.zhu@gmail.com,

A way to guarantee ordering is to use an ORDER BY clause.

Are you doing this in your export?

Allan



[quoted text, click to view]

Re: Transfer record sequence sherdian
7/6/2006 7:05:35 AM
I do this in both importing and exporting. But it was during the
importing process that the sequence was messed up. ORDER BY will not
work because my original file is not sorted is any way. Any
suggestions?

Thanks,
Sheridan

[quoted text, click to view]
Re: Transfer record sequence Roy Harvey
7/6/2006 10:30:22 AM
The way I have done this is to include an identity column in the table
definition, then ingore that column when importing the data using DTS.
The identity column is in the sequence of the incoming file. You
would then use an ORDER by when exporting the data back out - but
exclude the identity column from the export.

Roy Harvey
Beacon Falls, CT

On 6 Jul 2006 07:05:35 -0700, "sherdian" <sheridan.zhu@gmail.com>
[quoted text, click to view]
AddThis Social Bookmark Button