I have a BIDS project set-up to upload data from several flat files to a SQL Server 2008 database. The data is provided by another organization.
A lot of the data has trailing or leading spaces. This is enough of a problem that it would require me changing the size of the columns in my table to accommodate. I could use a derived column to resolve this, but there are enough columns that it would be impractical to set this all up manually.
I'm trying to use a script component (transformation) to remove leading and trailing spaces from every field before being uploaded. However, this is my first stab at using a script component and I'm having no luck.
Trying a simple foreach loop:
foreach(DataColumn i in Row)
{
/* do something */
}
Gives me an error, "foreach statement cannot operate on variables of type 'Input0Buffer' because 'Input0Buffer' does not contain a public definition of 'GetEnumerator'. What do I need to do to resolve this?