CRM On Demand - Reports and Dashboards (MOSC)

MOSC Banner

Using SQL Expression when creating a prompt

edited Sep 14, 2012 6:34AM in CRM On Demand - Reports and Dashboards (MOSC) 3 commentsAnswered
I am looking to define a prompt for a report that lists only the users as defined by the report's filter. For example, the report filter is identifying users who are on my team and have logged in successfully to the UI for the past 2 months. For the prompt, I want just those users showing, not all user values, and not users who have not logged in during this time. I've approached the resolution to be a SQL Expression. This is what I have:

SELECT "- Owned By User"."User Name" FROM "Advanced Custom Objects" WHERE "- Owned By User"."Manager Login" = VALUEOF(NQ_SESSION.REPLUSER) AND "- User Sign In History"."Login Timestamp" BETWEEN TIMESTAMPADD(SQL_TSI_MONTH, -2, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE)) AND NOW() ORDER BY "- Owned By User"."User Name" ASC

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