SSIS-没有相同数量的字符的字段,导致空格划界文件将数据推向下一列

发布于 2025-01-26 08:33:06 字数 283 浏览 1 评论 0原文

我在上传到SQL的空间划界文件有问题。除非有一个偶尔的长度差异,否则该列是由空间定界符分开的列,但列

href = “ https://i.sstatic.net/u6qbi.png” “这是数据查看器和file”

您可以从数据查看器中看到列从平面文件中输出的列输出源正在跨列移动数据。

我正在使用空间作为定界符。

即使飞行号少于一个,我也希望能够将数据放在同一列中。

I am having a problem with a space delimited file I am uploading to SQL. This works as needed except there is a column which has occasional length differences which is separated by a space delimiter...

This is data viewer and the file

As you can see from the data viewer the column output from the flat file source is moving data across the columns.

I am using a space as a delimiter.

I would like to be able to have the data in the same columns even if the flight number is one less.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆 2025-02-02 08:33:06

您没有空间划界文件,确实有固定宽度,或者更可能是破烂的,因为它在记事本,文件中很好地显示出来。

您需要相应地重新定义平面文件源。将格式从划界到右划分的格式。在列选择器中,您可以单击“标头栏”以识别列的位置(假设从划界到破烂的右置于现有列命名和键入的更改)

You don't have a space delimited file, you do have a fixed-width, or more likely a ragged right since it shows well in Notepad, file.

You'll need to re-define your Flat File Source accordingly. Change Format from Delimited to Ragged Right. In the Columns selector, you get to click the header bar to identify where columns are (assuming the change from delimited to ragged right drops the existing column naming and typing)

夜司空 2025-02-02 08:33:06

在这一条上,我必须从整体上加载每行,而不是能够分离为列。然后,我照顾了SQL中的所有“繁重”。

On this one I had to load each row as a whole rather than being able to separate into columns. I then took care of all the "heavy lifting" in SQL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文