COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS Query => Topic started by: MariusD on 02 Dec 2010 01:43:47 PM

Title: hiw to retrieve the latest datetime record
Post by: MariusD on 02 Dec 2010 01:43:47 PM
Hi,

I am trying to retrieve the latest record from a table (the record with the highest datetime). In TSQL, I can do select top 1 * from x, order by [date] desc - how do I translate that into a filter?

Thanks!
Title: Re: hiw to retrieve the latest datetime record
Post by: MFGF on 02 Dec 2010 04:05:55 PM
You could try adding a Rank calculation based on the date, then filtering the report for Rank = 1

MF.