views:

199

answers:

1

I am moving data into a DW using SQL Server SSIS and have the following SQL to populate one dimension

SELECT DISTINCT
cast (datename(dw,datum) as varchar(10)) as veckodag 
FROM XXXXX.dbo.Bought

as I have VARCHAR in the target column I need to CAST/CONVERT

Question how to convert Unicode to Varchar?

I get

*> Validation error. Datum OLE DB Source

[1]: Column "veckodag" cannot convert between unicode and non-unicode string data types. Package.dtsx 0 0*

+1  A: 

In SSIS use "Data Conversion Transformation" inside data flow

Damir Sudarevic
I have tested that but I get still an error.. I will do a new test
salgo60
Cast it as nvarchar(10) and then go through the transformation.
Damir Sudarevic
Yes that worked ..... Thanks Dan and Damir
salgo60