SSIS Derived Columns
I am trying to read the data from a flat file source. But, it is reading a single column as two columns and I want to bring the data together from 2 columns into 1 by using the derived columns option. But, when I try to map them, it gives me an error saying "The columns cannot be matched using the names. try to match them appropriately from the list of available columns." My question is how do I do it manually ?
August 30th, 2011 11:44am

The only reason the flat file source would read one of your columns as two columns is if it had a delimiter inside the column. For example, if you had a "name" column within a comma-delimited file, and the names happened to be "last name, first name". Anyway - what you need to do inside the Derived Column is to make sure you select a "new column" from the dropdown list in the bottom half of the window (column #2). Name it whatever you like (in column #1). For the expression, you need to know the names of the two columns you want to combine. I'll call them "col1" and "col2". Use an expression like this: [col1] + [col2] If you want something to appear between the two values - like a comma and a space - do this: [col1] + ", " + [col2] Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 12:17pm

Thanks Todd, I also have to change it's datatype from unicode to datetime. Can you help me with the expression ??
August 30th, 2011 1:19pm

Not without more information. Basically, you just have to place a cast operator in front, like: (DT_DBTIMESTAMP)([col1] + [col2]) Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 3:05pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics