Search code examples
sqloracledb2reportinghyperion

Hyperion Reporting - Query for prior day (DB2 and Oracle)


I am using Hyperion Reporting Studio. I have a report where I want to calculate the turn around time for messages that come in to my department.

I need to find a way, whether it's custom SQL or just a feature for the report to always pull the data from the prior day. I have an Open_Date filter where the setting is > 06/06/16 12:00 AM.

However I will always need the date to be the day prior to the current one. I will be using EPM which allows you to setup recurring reports, that run then get emailed to you on a daily basis, automatically. I need to figure out some custom SQL Hyperion can use in my date field and have not found any solutions.

Additional info: Using Hyperion Interactive Reporting Studio; DB2 and Oracle Databases.


Solution

  • It depends on your backend (DB2 or Oracle) which syntax you use. Also, do you want "yesterday" relative to the user, or to the server? Assuming the latter, because this sounds like a job on the server.

    I think what you're looking for is: CURRENT DATE for DB2 and SYSDATE for Oracle

    These are the equivalent of "today" relative to the server's date and time. Will the job run after midnight? It might be as simple as adding -1 but you could run into trouble if the job runs before midnight sometimes, and after midnight other times (don't know what would happen if the job ran through midnight).