Focal Point
[SOLVED] Dealing with Aggregation tables

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/73710948

April 17, 2009, 05:08 PM
AMARNATH_EL
[SOLVED] Dealing with Aggregation tables
Hi,

I just wanted to discuss with you all on how to handle Aggregated tables in WEBFOCUS.

If we create a synoym (say DAILY_BATCHES) which contains data at a daily level and give
it to a adhoc user he will create his own reports and will run it. If the users gives the
date range for 1 or more month then it is very tough to pull out the data.

Instead if we create a table BATCHES_MONTHLY and create a corresponding synonym in
WEBFOCUS, it would solve the problem even if the user enters a huge range.

Now I wanted to find out how we can change the underlying master file to be used when the user
runs the report. If user enters a range for 1 or more months then it should use the synonym
BATCHES_MONTHLY otherwise it should use DAILY_BATCHES.

How do we control such a behaviour. Please express your thoughts on how we can achieve this.

Thanks,
Amarnath

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.7
Unix
Excel/Html
April 17, 2009, 06:37 PM
GinnyJakes
You can use an amper variable in the request to hold the filename and alter its contents based on the input. E.g.

-SET &FILENAME=IF &MONTHS GT 1 THEN 'BATCHES_MONTHLY' ELSE 'DAILY_BATCHES';
TABLE FILE &FILENAME


This is pseudo-code that you will have to alter to your needs.

Good luck.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
April 21, 2009, 06:15 PM
AMARNATH_EL
Hi Ginny,

Thanks for sharing your thoughts.

I dont want specific to the report. If it for an adhoc user it will be tough for him to follow this logic.

Based on the parameter selection of the adhoc user the underlying SYNONYM (TABLE) usage should differ.

It should be generic for all the reports. Each report need not explicitly follow the logic.

Thanks,
Amarnath


WebFOCUS 7.6.7
Unix
Excel/Html