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

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

问题描述

我正在开发一个 SSIS 包,它将打开 Excel 电子表格并将数据导入 SQL Server 2008 中的数据库表中.当我尝试转换 Excel 列数据类型时:Unicode String [DT_WSTR] 到唯一标识符数据类型:unique identifier [DT_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?

推荐答案

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

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天全站免登陆