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.
Note
Use a negative number to indicate a descending sort order.
Repeat step 8 for each sorted column.
Note
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.
Click OK.
To save the updated package, click Save Selected Items on the File menu.
See Also
Concepts
Merge Transformation
Merge Join Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Data Flow How-to Topics (SSIS)
Other Resources
Integration Services Sources
Integration Services Destinations