SSIS包中的数据转换问题 - 文本为GUID [英] Data Conversion Issue in SSIS package - Text to GUID

查看:501
本文介绍了SSIS包中的数据转换问题 - 文本为GUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个SSIS包,它将打开一个Excel电子表格,并将数据导入到SQL Server 2008中的数据库表中。当我尝试转换Excel列数据类型: Unicode字符串[DT_WSTR] 到唯一的标识符数据类型:唯一标识符[DT_GUID] ,我收到以下错误:



Cast规范的字符值无效



我需要做些什么来解决转换错误?

解决方案

我使用派生列转换编辑器,并将excel列值包含在方括号 {} 中,以便SSIS包将Unicode字符串正确转换为GUID。


I am developing a SSIS package that will open an Excel spreadsheet and import the data into a database table in SQL Server 2008. When I try to convert the Excel column data type: Unicode String [DT_WSTR] to a unique identifier data type: unique identifier [DT_GUID], I get the following error:

"Invalid character value for cast specification"

What do I need to do to resolve the conversion error?

解决方案

I used a Derived Column Transformation Editor and to wrap the excel column value in squrly brackets {} in order for the SSIS package to properly convert the Unicode String into a GUID.

这篇关于SSIS包中的数据转换问题 - 文本为GUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆