Using QMF

Nesting scalar functions within column functions

If a column function's argument is a scalar function, the scalar function must include a reference to a column. For example, if you want to know the last year that any project will begin and the last year that any project will complete, you can run this query:

SELECT MAX(YEAR(STARTD)), MAX(YEAR(ENDD))
  FROM Q.PROJECT

QMF produces this report:

+--------------------------------------------------------------------------------+
|    LATEST        LATEST                                                        |
|     START      COMPLETION                                                      |
|  -----------  -----------                                                      |
|         1999         2000                                                      |
+--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]