The following query gets all of the rows between LowerBound and HigherBound from the ordered result set in the innermost query. This only works with Oracle8i, release 8.1 and up (order by in sub-queries not recognized until then). I used the data dictionary table all_objects as an example, you can put your own query there.
If you use the Cost Based Optimizer (CBO) in your Oracle database, you may be surprised to know that decreasing the ‘COST’ of a query does not necessarily mean increased performance.
While reading the CF-Talk e-mails, I noticed a couple of interesting, yet simple, facts about queries and totals in ColdFusion. First, in any query, queryName[”columnName”] returns an array of columnName values. Second, if you want to calculate the sum of columnName values, you can simply use the function arraySum(). Here is an example (tested on […]