CSV 文件字段中的逗号 - 使用 SSIS 导入到数据库 [英] Comma within fields in CSV file -import to DB using SSIS

查看:32
本文介绍了CSV 文件字段中的逗号 - 使用 SSIS 导入到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 CSV 文件 - 它有很多值将逗号作为值的一部分.字段中的逗号会误导我的 SSIS 包strong> 了解文件行的列数比之前说的多

I have a CSV file - It has many values having comma as a part of value.The commas within the fields will mislead my SSIS package to understand that file row has more columns than previously said!

如何解决这个问题?

例如:

姓名、金额、地址

我,20,000,我的家,印度

Me,20,000,My Home,India

你,23,300,你的家,在哪里

you,23,300,Your Home,Where

此处仅存在 3 列,但 SSIS 假定所有用于分隔字段的逗号;实际上并非全部.金额列和地址列有额外的逗号.

here only 3 columns exist but SSIS assumes all commas used to separate fields;Actually not all.Amount Column and Address Column have extra commas.

推荐答案

Use Text Qualifier in Flat File Connection Manager as ".这将仅用逗号分隔引号中的值.您来自 db 的数据将括在引号中.

Use Text Qualifier in Flat file Connection Manager as ". This will separate only values out of quotes by commas. Your data from db will be enclosed in quotes.

这篇关于CSV 文件字段中的逗号 - 使用 SSIS 导入到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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