How to: Sort Multiple Columns in Queries

You can specify the order in which you want to use the columns to sort the data by using the Sort Order column in the Criteria Pane.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To sort query results by more than one column

  1. In the Criteria pane, click the Sort Order field for the column upon which you want to sort.

  2. Type an integer or select an integer from the drop-down list to indicate this column's place in the order of sorted columns.

    Repeat steps for each column by which you want to sort your results.

See Also

Other Resources

Sorting and Grouping Query Results

Summarizing Query Results