How to add HAVING clause to query?

Greetings -

I’m wondering how to add a HAVING clause to a BO query. The situation is one where I need to filter data on an aggregate property of the rows, for example,

SELECT
ORDER_NUM, COUNT ()
FROM
ORDERS
GROUP BY
ORDER_NUM
[b]HAVING COUNT(
) > 1[/b]

I’m open to doing this in Designer or Reporter, whatever way gets it done. Thanks -


Rick Rogers :us: (BOB member since 2004-06-29)

In Designer create COUNT(*) as a measure object with projection set to SUM.

In Reporter create the condition: Measure object > 1
Because your measure object is using a SQL Group By function (Count(*) in your case) Business Objects will automatically generate a Having clause when you use it in a condition.


Andreas :de: (BOB member since 2002-06-20)

Thank you Andreas. That is exactly what I needed.


Rick Rogers :us: (BOB member since 2004-06-29)