SSIS 2014 问题与平面文件源中的货币(无小数) [英] SSIS 2014 issue with currency (Without Decimal) in a flat file source

查看:35
本文介绍了SSIS 2014 问题与平面文件源中的货币(无小数)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将数据从平面文件导入 Sql 服务器数据库.在平面文件中,数据没有小数,如 3000 表示 30.00.我尝试将此列设置为带有 DataScale 2 或 DT_Numeric 精度 (12 - 18) 和 DataScle 2 的 DT_Decimal,我还尝试了 DT_CY Currency.所有这些都是在数据库中插入值 3000.00 而不是 30.00.我不知道如何实现这个?

I am importing data from a flat file to Sql server database. In a flat file data comes without decimal like 3000 for 30.00. I tried setting up this column to DT_Decimal with DataScale 2 or DT_Numeric with precision (12 - 18) and DataScle 2 and I also tried DT_CY Currency. All these are inserting value as 3000.00 in database instead of 30.00. I don't know how to implement this?

推荐答案

我是按照以下步骤完成的:

I did it with the following steps:

1) 创建并打开一个 SSIS 项目

1) Created and opened, an SSIS project

2) 添加数据流任务

3) 创建一个平面文件源

3) Created a flat file source

4) 创建两步变换:

4a) Data Transformation to a dt_decimal

4b) Derived Column with the Expression: decColumn0 / 100

5) Ole DbDestination

5) Ole DbDestination

这篇关于SSIS 2014 问题与平面文件源中的货币(无小数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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