SQL ORDER BY Keyword

The ORDER BY keyword is used to sort the result-set by one or more columns.

You can sort the data in the SQL to save the time it takes for BI Publisher to generate the report.

Note: The BI Publisher can also sort the data.

You can use the ORDER BY operator.

Scenario

You want to sort your data first by Project ID and then by Invoice Record Number since that is the order the data will be reported on.

Solution

Add this to the end of our statement:

ORDER BY inv.PROJECT_ID,

inv.RECORD_NO



Legal Notices
Copyright © 2016, 2018, Oracle and/or its affiliates. All rights reserved.

Last Published Wednesday, March 28, 2018