Re: "duplicate" column names cause excel import fail



I am uploading multiple csv files. some of the files may have 2 columns with
the same name. The DTS package bombs out on this.

how do i get around this?

"Jeffrey Williams" wrote:

Looks like you have a column in your spread*** called 'ErrorColumn'.
SSIS is failing because it also creates a column with the same name.
Change the spread*** column name to something else and it should work.

I have no idea how you are going to be able to import data from
different spreadsheets into a single table when the spreadsheets have a
different format, other than creating separate import processes for each
type of spread***. Is there any way you can identify the type of
spread*** (by file name maybe?).

Gallardo wrote:
Hi Allan Mitchell

I am not a programmer. I am trying to write a program to upload csv files
to SQL. As simple as this may be I am having a few problems. I am using a
DTS package and want to make the upload as flexible as possible.

I have a folder with multiple csv files. I want to be able to choose which
ones I want to upload. They must then all upload into one table. In this
table on SQL each record must have a field with the name of the file they
came from.

I have found some DTS packages online that upload multiple csv files into a
table at once. This works.

But now if the source file has the same column name twice it wont work. If
for one csv file there is a field which i want to upload which is not in the
next csv file as well it crashes. I want it to put nulls instead.

Please HELP!


"Allan Mitchell" wrote:


Hello adolf,

The error has nothing to do with what is in the spread*** . The error
says there is a duplicate column name of "ErrorColumn" in the pipeline.
ErrorColumn is a column added to the pipeline when you consume an Error Output
from a component.

I would be interested as to how you came by this error. It looks as though
you are using the Import/Export wizard.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com


I saved the xls as a csv, tried again and it worked.

SSIS has once again proved to be unstable.

"adolf garlic" wrote:


I am getting the following errors when performing a simple import
data wizard using excel as source:

- Validating (Error)
Messages
Error 0xc0047008: Data Flow Task: The package contains two objects
with the
duplicate name of "output column "ErrorColumn" (12)" and "output
column
"ErrorColumn" (37)".
(SQL Server Import and Export Wizard)
Error 0xc004706b: Data Flow Task: "component "Source - Sheet1$" (1)"
failed
validation and returned validation status "VS_ISCORRUPT".
(SQL Server Import and Export Wizard)
Error 0xc004700c: Data Flow Task: One or more component failed
validation. (SQL Server Import and Export Wizard)

Error 0xc0024107: Data Flow Task: There were errors during task
validation. (SQL Server Import and Export Wizard)

The spread*** does *not* have duplicate column names!

These are the columns in the xls
RevenueTypeID,
RevenueValue,
RevenueAssetCode,
SpotRevenueToBaseCurrency,
DealID,
RevenueAssetID,
ErrorCodes,
ErrorColumn
Why am I getting (yet another) "error" with SSIS?

Nothing has the xls open.
I have db rights to create tables etc.
The more I use SSIS the more I hate it.





.