Skip to content
Advertisement

Oracle SQL data fetch order

I’m trying to achieve this Layout. I’m not sharing the query because it’s working, I’m just wondering what functions to use in order to achieve format ‘2’. In the beginning I was doing UNION ALL , that’s how I got format ‘1’. The data is fetched from multiple tables. I’m trying to achieve this without PLSQL. Thank you !

How I got it ‘1’

How I want to transform it ‘2’

Advertisement

Answer

APEX has built-in support for this type of formatting in Classic Reports – it’s called Break Formatting. Follow these steps to get an idea of how it works:

Create a Classic Report with the following query:

Go into the report options and set Break Columns (under Break Formatting) to First Column. Then, drill into the SAL column and enable the Sum setting.

That should give you something like this: enter image description here

See this blog post by Jeff Eberhard for more info: https://blog.eberapp.com/ords/f?p=BLOG:READ:::::ARTICLE:6555300346233507&cs=17CDD85DFBD5E33D7BD8F7945B94027CE

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement