How to: Set Sort Attributes on an Output
The Merge and the Merge Join transformations require sorted inputs. The input datasets must be sorted physically, and sort options must be set on the outputs and the output columns in the source or in the upstream transformation.
To set sort attributes
In Business Intelligence Development Studio, open the Integration Services project that contains the package you want.
In Solution Explorer, double-click the package to open it.
Click the Data Flow tab, and, from the Toolbox, drag the data flow component to the design surface.
Right-click the component and click Show Advanced Editor.
Click the Input and Output Properties tab.
Click <component name> Output, and set the IsSorted property to True.
Expand Output Columns.
Click the column you want to indicate is sorted and set its SortKeyPosition property to a nonzero integer value.
Use a negative number to indicate a descending sort order.
Repeat step 8 for each sorted column.
The numbers that are assigned to the SortKeyPosition properties must represent a numeric sequence, starting with 1 and incremented by 1. If SortKeyPosition is a negative number, the absolute value of the number determines its place in the sequence.
To save the updated package, click Save Selected Items on the File menu.