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

Query - on database today but not yesterday

Started by verypromptu, 16 Aug 2010 06:09:55 AM

Previous topic - Next topic

verypromptu

I am slowly getting to grips with Cognos thanks to the many tutorials and the great source of information this site provides.  I am slightly stumped by a particular need and would oblige any advice that you can give.

I have a database showing sales by date for particular clients.  This relies on the database being updated on a regular occurrence.  I would like to see any new sales that have appeared on the database today but were not there yesterday.  This would not be a problem if the date sales were today, however a large number of the transactions occurred in the past.  We do not have any fields that show the date the data was input however we hoped an expression could show "any items on database today but not yesterday".

Is this a viable solution or are there alternatives that we are missing (and sadly no it is not possible to add a date input).

Thanks for your help,

Greg

dlafrance

It could be achieved by a little stored procedure and a temporary table..

Each night, the stored procedure copy the Id of your sales table into the temporary table.

When you are doing your queries, you select the sales where the id isn't in the temporary table.

There is no way i know to do differential comparaison inside Cognos. The other way is to add a column that will by default be set to the current_time. Yes it will alter the structure of the table, but, it should not require any update for programs.

Hope i have helped you!

paulsol

See if the rowid column of the oracle db can work ? Alternatively, you can generate a 'running count' and log the running count somewhere and anything greater than that running count, you can conditionally format it to show out.