Database Install/Upgrade/Opatch (MOSC)

MOSC Banner

To default value of month prompt using SQL result

edited Dec 17, 2016 4:00AM in Database Install/Upgrade/Opatch (MOSC) 3 commentsAnswered

1)I want to default date and month values in their prompts to be used for my dashboard.

Following is my SQL for date:

select CAST(CAST(TIMESTAMPADD(SQL_TSI_DAY,-2,CURRENT_DATE) AS CHAR) AS TIMESTAMP)

FROM "Subject Area".

2) Similarly, I also want to default the value of month for which I have following SQL.

Select Month (TIMESTAMPADD(SQL_TSI_MONTH,-0,TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( TIMESTAMP '@{p_date}' ) * -(1) + 1, TIMESTAMP '@{p_date}'))) from "Subject Area".

Or instead of using TIMESTAMP '@{p_date}' I can also use CURRENT_DATE which also returns the same result.

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