BI Publisher (MOSC)

MOSC Banner

How to add to a SQL Date Bind variable in BI Publisher

edited Mar 17, 2020 5:04AM in BI Publisher (MOSC) 7 commentsAnswered

When I run the following sql to add days to a bind variable I get an error in BI Publisher but it works in SQL Developer:

with dates as 

(

   select * from sql_date_table 

   where (trunc(calendar_dte) >= (:FromLabNotifDate) or 'All' IN (:FromLabNotifDate || 'All'))

         and (trunc(calendar_dte) <= TO_DATE(:ToLabNotifDate)+5 or 'All' IN (TO_DATE(:ToLabNotifDate)+5 || 'All'))

   order by calendar_dte asc

)

select * from dates

I receive the error:

SQL or ORA exceptions caused due to invalid sql, database package state or some database exceptions

Does any one know what the issue is?

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