Partilhar via


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

  1. In Business Intelligence Development Studio, open the Integration Services project that contains the package you want.

  2. In Solution Explorer, double-click the package to open it.

  3. Click the Data Flow tab, and, from the Toolbox, drag the data flow component to the design surface.

  4. Right-click the component and click Show Advanced Editor.

  5. Click the Input and Output Properties tab.

  6. Click <component name> Output, and set the IsSorted property to True.

  7. Expand Output Columns.

  8. 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.

  9. 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.

  10. Click OK.

  11. 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

Help and Information

Getting SQL Server 2005 Assistance