DB2 graphic  QMF Version 8

DO., DO(n). -- Sort rows in descending order

To put rows in a report in descending order by the values in some column, put DO. in that column. Use the letter "O" (not the digit zero "0").

The sorting sequence for character data, in descending order, is as follows:

  1. NULL
  2. Numbers, in descending order
  3. Uppercase letters, in descending alphabetic order
  4. Lowercase letters, in descending alphabetic order
  5. Special characters, including blank

With DO., the sorting sequence for DATE, TIME, and TIMESTAMP values is reverse chronological.

The internal value of the data determines the sorting sequence for DBCS data. The sorting sequence generally is not meaningful.

The following query produces a report that lists the name, job, and years of employment for each employee in department 84 in descending order by job.

When you run this query:

Q.STAFF | ID | NAME | DEPT | JOB         | YEARS | SALARY | COMM |
--------+----+------+------+-------------+-------+--------+------|
        |    | P.   | 84   | P. DO.      | P.    |        |      |

QMF produces this report:

NAME       JOB    YEARS
---------  -----  -----
EDWARDS    SALES      7
DAVIS      SALES      5
QUILL      MGR       10
GAFNEY     CLERK      5


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004