dbTalk Databases Forums  

Transfer record sequence

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Transfer record sequence in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Transfer record sequence - 06-28-2006 , 04:12 PM






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


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Transfer record sequence - 07-01-2006 , 05:34 AM






Hello sheridan.zhu (AT) gmail (DOT) com,

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

Are you doing this in your export?

Allan



Quote:
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




Reply With Quote
  #3  
Old   
sherdian
 
Posts: n/a

Default Re: Transfer record sequence - 07-06-2006 , 09:05 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

Allan Mitchell wrote:
Quote:
Hello sheridan.zhu (AT) gmail (DOT) com,

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

Are you doing this in your export?

Allan



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



Reply With Quote
  #4  
Old   
Roy Harvey
 
Posts: n/a

Default Re: Transfer record sequence - 07-06-2006 , 09:30 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 (AT) gmail (DOT) com>
wrote:

Quote:
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

Allan Mitchell wrote:
Hello sheridan.zhu (AT) gmail (DOT) com,

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

Are you doing this in your export?

Allan



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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.