Always happy to try for the 'post most unrelated to climbing' award. I know there are several DB geeks on here
Very early days for me in terms of SSIS so this is probably achingly obvious.
As a dummy example I've got a very simple table with two colums (Name - VARCHAR (50) and LastName - NVARCHAR (50)) and a spreadsheet ready to be the dataflow destination for the data in the table with columns outputName and outputLastName.
Got the Dataflow task on the Control Flow canvas, and on the Control Flow canvas I've got:
An OLE DB Source pointing at the table and retrieving the 2 columns (working fine)
An Excel Destination pointing at the spreadsheet. Linked, and columns mapped
I get the error message "Columns Name and outputName cannot convert between unicode and non-unicode strings data types"
So next step is to put the Derived Column transformation in between the two...
I thought I would be able to cast "Name" to a unicode datatype using:
Derived Column Name --> Name
Derived Column --> Replace 'Name'
Expression --> (DT_WSTR,50)Name
So that I would still only have two output columns...I thought that this would push out the column as a DT_WTSR datatype, rather than the DT_STR type it's coming in as...but the error still persists.
The only way around this I can see is to do the transformation as
Derived Column Name --> Name_New
Derived Column --> [add as new column]
Expression --> (DT_WSTR,50)Name
So that I end up with three columns: Name, LastName and Name_New (and I just ignore the original Name column)
Got some screen shots which might make it clearer. Virtual beer in it if anyone can help, maybe even a real one if you live in the manc area.
Post edited at 16:21