dbTalk Databases Forums  

SSIS: Flat File columns change positions

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


Discuss SSIS: Flat File columns change positions in the microsoft.public.sqlserver.dts forum.



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

Default SSIS: Flat File columns change positions - 02-25-2008 , 03:56 PM






Hello all,

Some of our clients send us update data periodically (usually every 3
months, but sometimes every 6 months or every year), so I design ssis
packages for each client's project to easily import their update data.

With the project I'm working on now, this client's update data had the
columns in a different order (same columns, same data, just a different
order). The data files are CSV text files with column names/headers in the
first row. The SSIS package was designed for CSV files with column names in
the first row.

Trying to import this client's update data, the SSIS package stopped with
errors....some "cast" error on a derived column task (actual error message
is not important...was trying to import a description column
(string/varchar) into an interest rate column (real)), because the columns
were not in the same order.

It seems the quickest way to fix this is to open the flat file connection
manager for the source file, uncheck "Column names in the first data row" on
the General page, switch to the Columns page, switch back to the General
page and recheck the "Column names in the first data row", and switch back
to the Columns page to reestablish the columns.

Is there any way to design the SSIS package so that it will read the column
names/headers from the first row of the data file and map them accordingly,
instead of mapping the columns in the same order as the original design? If
I remember correctly, DTS did this.

Thanks for any help anyone can provide,

Conan Kelly



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.