Iterative Calculations with Multidimensional Data
Kim Berg Hansen · Apress eBooks · 2020
You won’t find a multitude of real-life examples using the model clause, apart from doing recursion and iteration as I showed in Chapter 4 . Recursive subquery factoring came in version 11, but with the model clause, you could do recursion from version 10. However, the real power of the model clause is the way you can address data in multiple dimensions in an array-like fashion, building formulas similar to the way spreadsheets work. The model clause is not the obvious choice for implementation of everything, but this chapter shows you an example that fits perfectly and uses both multiple dimensions as well as iteration. This example may not be the most useful in itself, but it demonstrates very well the kind of situations where you could consider using the model clause.