Skip to Main Content
Feature Request FR-3434
Product Area Page Components
Status CLOSED

6 Voters

Making Pivot tables more dynamic to handle

stefan.preis Public
· Oct 18 2023

Dear all,

I want to display some data from a sql source in an apex table in the pivot way. I habe some table as a source, and with

select * from
(
select -- mit der Vortabelle nochmal alles auslesen und das Pivot erstellen
w.*,
t.CNT_TOTAL,
t.ALARM,
t.TYPE_HTTP

from command.WDR_APEX_LAGERWARE_SFP w
--
left join TOTALS t on t.TYPE = w.TYPE

)

pivot
(
sum(CNT) for LAGER in ('1 - IFS Warenerfassung', '2 - IFS-Lager Montage', '3a - IFS-Zentrallager IT', '3m - IFS Ludwigstr. Stage', '5d - NuS-Lager Quincy N226',
'5e - Cisco SFP Support Lager', '5g - IFS - NuS Miniswitche Berlich 411')
);

I try to pivot the data. It works - but it's certainly not dynamic! Each time I have a new LAGER in the source table, or if the name of a LAGER changes, I must edit the sql code underlying the pivot table in apex. That's far from cool, and is quite the opposite of what apex states to be: a low code ide.

I would ask for implementing an easier way to pivot, may it be through implementing a petter pivot function in Oracle SQL, or having some cool item in apex which does the handling in the background.

Thank you
Stefan
WDR Cologne

This request is likely a duplicate of FR-2532.

Comments

Comments

  • arne.bruening OP 1.8 years ago

    I have the same problem with another customer. We discussed using PIVOT XML for pivot results with a varying number of columns. That would give us the correct result in XML. But we would need a nice way to display that result in APEX.

  • fac586 OP 1.8 years ago

    I have the same problem with another customer. We discussed using PIVOT XML for pivot results with a varying number of columns. That would give us the correct result in XML. But we would need a nice way to display that result in APEX.

    Something I demonstrated quite a while ago…

    https://forums.oracle.com/ords/apexds/post/matrix-report-0685

  • arne.bruening OP 1.8 years ago

    @fac586 Wow, just skipping through it, this looks like a very cool solution, many thanks. 

    Also FR-2532 in general describes what my customers need. In general, the IR Pivot function goes into the right direction, just more flexibility is needed, eg. more than 3 Row Columns are needed.