BI Publisher (MOSC)

MOSC Banner

BIP 11.1.1.7.1: Using parameter in select list

edited Jan 14, 2014 1:05PM in BI Publisher (MOSC) 3 commentsAnswered ✓
Hello,

I have a report which has a sql which aggregates data to prior_day, month-to-date, year-to-date based on the parameter passed. In this case the parameter was defined as a varchar2/text would have a value like 01/14/2014

The SQL is as follows, you can see that the :p_parm_date is used in the select-list to appropriately sum the data.

SELECT
.......

, ROUND( SUM(
    CASE
      WHEN TO_CHAR(t.TMSHT_DATE,'mm/dd/yyyy') = TO_CHAR(to_date(:p_parm_date, 'mm/dd/yyyy')-1,'mm/dd/yyyy')
      THEN HOURS
      ELSE 0
    END ) ) PRIOR_DAY_HOURS
, ROUND(SUM(
    CASE
      WHEN TO_CHAR(t.TMSHT_DATE,'mm') = TO_CHAR(to_date(:p_parm_date,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center