Browsing: Data Warehousing & BI

Business Intelligence such as OLAP, BI Beans, Discoverer, Data Mining and Data Warehousing such as OWB

Data Warehousing & BI
4 Pivoting in SQL using the 10g Model Clause

In this post we discuss pivoting of records in SQL – either splitting or merging records. Typically this is done using PL/SQL based Table Functioins, UNION (for splitting records) and fairly complex, tricky SQL statements. In Oracle 10g, using the MODEL clause, there is a clean, fairly straightforward way to achieve elegant pivoting – even nested pivoting – in single SQL statements. This post shows the pivot operation using the Model clause.