Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science & Engineering 2111 Sorting in Queries 1CSE 2111 Lecture-Advanced Queries.

Similar presentations


Presentation on theme: "Computer Science & Engineering 2111 Sorting in Queries 1CSE 2111 Lecture-Advanced Queries."— Presentation transcript:

1 Computer Science & Engineering 2111 Sorting in Queries 1CSE 2111 Lecture-Advanced Queries

2 Sorting Results in a Query Use the Sorting line - Ascending or Descending to sort the resulting Query Table l To sort multiple fields – The computer will apply sort precedence for sorting fields listed on a query from left to right. l Sorting can be combined with any of the filtering techniques (criteria) we have already discussed. 2 CSE 2111 Lecture-Advanced Queries

3 Write a query to list the Last name and First name of all clients. The list should be sorted in ascending order by Last name, and then by First name.. Field LNameFName Table Client Sort Ascending Show xx Criteria OR 3 Query Name:NameSortTables Required:Client Foreign Keys:NoneJoin Type:None Major Sort CSE 2111 Lecture-Advanced Queries Minor Sort

4 The data table The resulting dynaset 4 CSE 2111 Lecture-Advanced Queries

5 Write a query to list the city and state of all clients The list should be sorted in ascending order by State and then by City. Field CityStateCity Table Client Sort Ascending Show xx Criteria OR 5 Query Name:CityStateSortTables Required:Client Foreign Keys:NoneJoin Type:None Major Sort CSE 2111 Lecture-Advanced Queries Minor Sort

6 The data table The resulting dynaset 6 CSE 2111 Lecture-Advanced Queries


Download ppt "Computer Science & Engineering 2111 Sorting in Queries 1CSE 2111 Lecture-Advanced Queries."

Similar presentations


Ads by Google