"Jamie Carper - MJW Corp" <Jamie Carper - MJW Corp @discussions.microsoft.com> wrote in message
news:78F34201-99FF-47BB-AF29-3701D9986AD3@microsoft.com...
>I too am attempting to dynamically map the destination columns.
>
> I have a DTS that reads from multiple text files importing them into a SQL
> tables. I do not know from one file to the next what the structure is going
> to be. However I have included a sort of header file for my DTS to read
> before the transformation. From this header file I am able thru the Dynamic
> Properties to run a SQL query that builds the receiving table. I then thru
> the same process set both the Source and Destination. I am also able to set
> the column lengths of the TextFile object prior to Transformation.
>
> However I cannot determine how to affect the mappings. All I want is for the
> DTS to use the default mapping it uses when I enter the Transformation
> dialog. Nothing more nothing less. I want to do this using either the Dynamic
> Properties or some other DTS process.
>
>
>
>
> "Allan Mitchell" wrote:
>
>> In article <#WLANUMnEHA.3684@TK2MSFTNGP10.phx.gbl>, Krish wrote:
>> > I believe there a way to do dynamic transformation mapping.
>> >
>> > I have source file as text file (two different text files), delimited pipe.
>> > Iam exporting data from text file to Sqlserver database using DTS.
>> >
>> > 1st type of text file has - 32 columns
>> >
>> > 2nd type of text file has - 21 columns
>> >
>> > (both has same column name, expect number of columns)
>> >
>> > Iam using scripts to map two different text files (different names too..),
>> > but finding hard time in mapping columns dynamically.
>> >
>> > Any script help appreciated.
>> >
>> > Thanks,
>> >
>> > Krish
>> >
>>
>> OK
>>
>> Dynamic mapping is not as easy as it could/should be.
>>
>> In your instance the solution is simple.
>>
>> You have two datapump tasks. One for a 32 column text file and one for the 21
>> column text file.
>>
>> At the start of the package you check the file to see which type it is. You
>> then Enble/Disable the correct instance of the datapump.
>>
>>
>> --
>>
>> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
>>
www.SQLDTS.com - The site for all your DTS needs.
>>
www.konesans.com - Consultancy from the people who know
>>
>>
>>
>>