The step output column sequence in the SSIS execution variable is different from the SQL query column sequence.

Source: Internet
Author: User
Tags ssis

This problem was encountered by a friend who made an SSIS program to import data to txt. Then, use Oracle tools to import data to Oracle. However, when executing the variable step in SSIS, it is found that the output column name is completely different from the queried column name. For example, Schema_id is in the third column of the query, but 6th columns are output.

650) this. width = 650; "style =" height: 182px; width: 443px; "alt =" SouthEast "src =" http://img.blog.csdn.net/20131204105236203? Watermark/2/text/plain =/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA =/dissolve/70/gravity/SouthEast "width =" 604 "height =" 346 "/>

650) this. width = 650; "style =" height: 300px; width: pixel PX; "alt =" SouthEast "src =" http://img.blog.csdn.net/20131204105244906? Watermark/2/text/plain =/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA =/dissolve/70/gravity/SouthEast "width =" 608 "height =" 493 "/>

Because the txt format has been defined and the parsing program has been completed, if there is a problem with the txt column order, the subsequent operations will be affected. It seems that there is no place to adjust the order of output.

Of course, this problem can be solved by adjusting the sequence of the target column, but manual adjustment is required. If there are too many columns, It is troublesome.

In addition, after testing, directly querying from the Table or command will not solve this problem. I feel that Microsoft did not consider sorting when parsing the variable.

Later I found a Blog also mentioned this problem:SSIS series-solutions to inconsistent column output sequence caused by variable query statements

You can use the following method:

The solution requires manual operations, but it is much easier to delete new columns in the File Manager. To return to the data source column, cancel all available columns first.

650) this. width = 650; "alt =" 04123629-3f61655442584c709ac685f84256245 "src =" http://www.bkjia.com/uploads/allimg/131229/2221294I0-0.png "/>

Then, select the required columns in sequence based on the query statement column sequence. For example, check BusinessEntityID first and NationalIDNumber second, and then select the columns in sequence as needed.

650) this. width = 650; "alt =" 04123918-5f2e8fd7dd574c8f95a229941ff3921 "src =" http://www.bkjia.com/uploads/allimg/131229/2221295421-1.png "/>

After the selection is complete, all columns are output in the query order.

650) this. width = 650; "alt =" 04123959-0abd2d00a45f46ca9c4f35f0840cdb6 "src =" http://www.bkjia.com/uploads/allimg/131229/2221296222-2.png "/>

You need to re-create a new file link manager to avoid the impact of the previous cache. Then you can see that the column order in the Manager is consistent and there is no problem.

650) this. width = 650; "alt =" 04123161-06b43bb26f32435987945d7ccbdadfc "src =" http://www.bkjia.com/uploads/allimg/131229/222129BL-3.png "/>

 

 

 

This article is from the "follow SQL Server Technology" blog, please be sure to keep this source http://lzf328.blog.51cto.com/1196996/1335777

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.