开发者

SSIS package having problem with datename(dw,datum) converting to varchar

开发者 https://www.devze.com 2022-12-11 02:52 出处:网络
I am moving data into a DW using SQL Server SSIS and have the following SQL to populate one dimension

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*


In SSIS use "Data Conversion Transformation" inside data flow

0

精彩评论

暂无评论...
验证码 换一张
取 消