If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How can you identify/return duplicate rows?

Started by psrpsrpsr, 02 Aug 2017 08:46:30 AM

Previous topic - Next topic

psrpsrpsr

In SQL it's easy to identify duplicate rows by using GROUP BY and HAVING:

SELECT [field1],[field2],COUNT(*)
FROM tbl
GROUP BY [field1],[field2]
HAVING COUNT(*) > 1                 (https://stackoverflow.com/questions/2594829/finding-duplicate-values-in-a-sql-table)

How can you achieve this in Cognos? Are there multiple ways, and if so, what would be the 'best' by convention?

Thanks all

hespora

Same thing, really.

create one data item

count(
  [any field you might have]
  for [field1],[field2]
)

and filter on that data item >1, with filter after auto aggregation.

psrpsrpsr


hespora