cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregate Queries

Former Member
0 Kudos

Hi All,

In xMII Logic Editor, we have something called as Aggregate Queries under xMII Data Queries. Can anybody please tell me the steps as to how to use that option??

Thanks,

Lipsa.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Lipsa,

Aggregate queries are used to combine results of more than one query template

You can combine queries from multiple data sources also.

That is you will get different rowsets for each query

In BLS when you call this aggregate query the result of this action will be a xml with result sets of each query called by your aggregate query.

First create an aggregate query and then call it from BLS

You can now map them accordingly....

Hope this helps

Thanks,

Ajitha

Message was edited by:

Ajitha

Answers (4)

Answers (4)

jcgood25
Active Contributor
0 Kudos

Lipsa,

Like mentioned by my former colleague Ryan you will be better off with an XacuteQuery over an AggregateQuery. About the only use for the Agg one is when each of the queries return a similar shape of data, like querying historical data from more than one historian and comparing them in the same iChart.

Each query in the Aggregate template is run and becomes a separate Rowset (or html table) in the results. In order to combine the separate results into a merged dataset you will need to use an InlineTransform, which adds a whole other layer of complexity. If you are using a <SERVLET/> call on an irpt page and want the completely different tables of data then that's another applicable use of the AggregateQuery.

Hope this clears things up for you

Best Regards,

Jeremy Good

Former Member
0 Kudos

Hi, Lipsa.

In general, do not use aggregate queries. They are a legacy component of xMII that existing before BLS was available. Use BLS to combine multiple queries into a single output, not the aggregate queries.

Best regards,

Rick

Former Member
0 Kudos

Hi All,

Can anybody please let me know as to why one should not opt for Aggregate Queries? Is it only because Aggregate Query is a legacy component of xMII??

Or there is any other specific disadvantage as such??

Thanks,

Lipsa.

Former Member
0 Kudos

Don't do it; just say no.

You'll yield much better performance using BLS over the Aggregate Query.

Former Member
0 Kudos

I would recommend going through

Take a special note to the replies given by Rick Bullotta.

Former Member
0 Kudos

Hi Lipsa,

You can create an aggregate query in the query editor just like any other query. What the agg query does it is combines the results from multiple queries into a single result set. I think you can combine upto 32 queries within a single queries.

You can then use this query in the business logic editor just like any other query and perform calculation/logic transformations on it.

You can look in the help menu for more information:

http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm