Folks,
The following query is sending me an error for getting the last 30 days.
within the Framework Manager Subject Query that is SQL based.
where
and ((TRANSACTION.DATE_TIME) >= trunc(SYSDATE)-30)
and ((TRANSACTION.DATE_TIME) < trunc(SYSDATE) ) It is recommended that you view the query feedback on the "Query Information" tab.
RQP-DEF-0177 An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'.
UDA-SQL-0358 Line 27: Syntax error near "-30".
Please help!
Why are you trying to code this into the SQL rather than using a filter expression in the query subject definition?
Wouldn't the appropriate filter expression be:
[Your Namespace].[Your query subject].[DATE_TIME] between _add_days(current_date,-30) and current_date
Regards,
MF.
Thanks so much! Your code did the trick. I would love t know how to do the same using "Filter Expression"
Here is what I have but end up getting errors. Didn't know what to have the below to work without the
prompt requirements.
([DATE_TIME] >= to_date(#prompt('Begin_Date')#, 'YYYY-MM-DD HH24:MI:SS')
([DATE_TIME] < (to_date(#prompt('End_Date')#, 'YYYY-MM-DD HH24:MI:SS') -30))
You are a life saver!!
Quote from: gosoccer on 21 Apr 2014 12:26:32 PM
Thanks so much! Your code did the trick. I would love t know how to do the same using "Filter Expression"
Here is what I have but end up getting errors. Didn't know what to have the below to work without the
prompt requirements.
([DATE_TIME] >= to_date(#prompt('Begin_Date')#, 'YYYY-MM-DD HH24:MI:SS')
([DATE_TIME] < (to_date(#prompt('End_Date')#, 'YYYY-MM-DD HH24:MI:SS') -30))
You are a life saver!!
Hi,
Sorry - I'm not following. I gave you a filter expression already?? What part doesn't work?
The code you included above contains prompt macros - do you need to prompt for a date?
MF.
NO need for prompt macros. Thank you for your time. It is working perfectly.