gpt4 book ai didi

I am exporting to a flat file using SSIS. Why do some of my columns contain the result and 4 decimal places?(我正在使用SSIS导出到平面文件。为什么我的一些列包含结果和4个小数位?)

转载 作者:bug小助手 更新时间:2023-10-25 14:04:17 26 4
gpt4 key购买 nike



I am new to using Visual Studio. I have my data goin to a flat file.
There are 4 columns, all numerical values and 1 date.

我对使用Visual Studio还是个新手。我把我的数据存入了一个平面文件。共有4列,全部为数值和1个日期。


2 of the numerical values keep exporting to the file as #.0000

2个数值继续以#.0000的形式导出到文件


What do I need to do to get the export to keep the whole value? NO decimals

我需要做什么才能使出口保持整体价值?没有小数点


Again being new, I tried changing the value type but couldn't figure it out.

同样是新手,我尝试更改值类型,但无法弄清楚。


enter image description here


enter image description here


enter image description here

在此处输入图像描述


更多回答

It's hard to tell without seeing the steps in your DataFlow and the exact data types used in your source and destination functoids. As a rule of thumb, usually the source dictates the data type and you'll to explicitly convert to a different data type (like DT_I4 integer). Inspect your source using right-click to Advanced edit... and examine the external source columns and their data types.

如果不查看数据流中的步骤以及源和目标Functoid中使用的确切数据类型,就很难判断。根据经验,通常源指定数据类型,您将显式转换为不同的数据类型(如DT_I4整数)。使用鼠标右键单击高级编辑来检查您的源...并检查外部源列及其数据类型。

I attached some photos . You can see the sql pulls the correct way but the file created has the extra 0's

我附上了一些照片。您可以看到,SQL拉取的方式是正确的,但是创建的文件有额外的0‘S

The images are good start to improving the question. So you've got an Oracle? source based on the to_char call for column 3. How is the ATT_CODE_ column defined in Oracle? If you double click the connection between the ADO.NET Source and the Flat File Destination, on the Metadata tab, what does it list for the data type there for ATT_CODE_... column? Finally, in the Flat File Connection Manager 2 what is specified for this column (Not the destination but in the actual CM)?

这些图片是改善这个问题的良好开端。所以你有先知了?基于第3列的TO_CHAR调用的来源。在Oracle中如何定义ATT_CODE_COLUMN?如果双击ADO.NET源和平面文件目标之间的连接,则在元数据选项卡上,它会列出ATT_CODE_...的数据类型是什么?专栏?最后,在平面文件连接管理器2中,为该列指定了什么(不是目的地,而是在实际的CM中)?

Check the last photo I uploaded regarding the meta

检查我上传的最后一张关于Meta的照片

优秀答案推荐

When configuring your destination flat file, make sure that both column data types (SchoolID, ATT_CODE) is one of the integer-type data in your Flat File Connection Manager, DT_I4 as in the below picture:

配置目标平面文件时,请确保两种列数据类型(SchoolID、ATT_CODE)都是平面文件连接管理器DT_I4中的整型数据之一,如下图所示:


DERD


Then go back to your source to preview data:

然后返回到您的源以预览数据:


DATEEEEE


After running package, EndResult:

运行Package后,EndResult:


End_Result


更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com