Skip to content
Advertisement

How to create a summary view from multiple views?

Given I have the following view where N=1..100

Currently we have summary views which insert to a table like

The table is then used to create an overall summary like

Is there a way to create summary_view_all_plants without having to create each individual summary_view_N? I would like to be able to iterate though a list of reports and dynamically generate the insert views.

Advertisement

Answer

Found a good solution to this. I have a table which holds the names of the views which I want to summarize (detail_view_Names). I go thought each Report Name and build a query that performs the summary of each report.

To add a new report to the summary, just add a new report to the detail_view_Names

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