BusinessObjects Board

SQL Syntax

Hi,

Can anyone tell what the difference is between.

count(id) in the select statement in the object or choosing count from the properties tab.

Help please! :?

Thanks
Candy :?


eye_candy :us: (BOB member since 2005-03-18)

Hi Candy,

If I remember correctly, Count(id) will count each id within your database and ultimately give you a sum, whereas the Count aggregation will count the distinct id, thus removing any duplication of an id.

It is however really easy to test and I would suggest that you give it ago, you will soon see if there is a difference.


plessiusa :netherlands: (BOB member since 2004-03-22)

count in the select will aggregate for all dimensions and will return only a single row for each unique combination of dimensions. Count on the properties (if there is no count on the select) will return all rows and do the aggregation at the report level. Count on the select should provide better performance as the aggregation happens on the database and returns fewer rows to the report.


tmarion :us: (BOB member since 2002-08-20)

This topic came up a couple of days ago. I think this is what you are asking and that post describes it well.


dessa :madagascar: (BOB member since 2004-01-29)