Re: DTS Datapump Column Order Unstable



According to the SQL Online Help I have been reading. It is more effiecient
to reference the columns by index than by name. So I find it curious that the
index cannot be trusted. But all that set aside...

Normally I would use the Column name in most situations. However I am
reading 1000s of Excel files with inconsistent column structures. I
therefore have some code that reads the column headings of each column and
then attempts to reconcile these headings with the field names in my target
table. Essentially I am dynamically mapping the columns to the fields for
each work*** I read (upto 60 in each file).

For this to work I need to reference the Destination fields in a specific
known order. The problem is that order keeps changing! And when I say
changing I mean the entire collection reverses at times and reverts at other
times. I cannot put my finger on what causes the problem. I know it is a
wizard issue and occurs anytime I reenter the wizard dialog
source/destination tabs.

At one time I tried to force the issue by removing and re-adding the fields
in the order I wanted. But that really screwed up the process because now
when the Source collection order is correct, the Destination order is
reversed and visa-versa.

"Allan Mitchell" wrote:

> Can you not use Column Names?
>
> I do not believe you should rely on ordinal number ever.

Jamie

.