ORACLENERD twitter/oraclenerd view chet justice's profile on LinkedIn feed oraclenerd t-shirts

  OBIEE: Evaluate
Friday, October 29, 2010
I haven't had a whole lot of opportunities to use this function. It's actually so rare, that I forget how to use it.

In the fine tradition of documenting everything, here I go.

Evaluate Syntax:
EVAULATE('your db function(%1,%2)', parameter list)
The reason I need to use it is because we are removing a view that has some fun SUBSTR/INSTR action in it. I tried writing it up in OBIEE SQL, but it doesn't allow you to traverse from the end of the string...well, someone out there probably could, but I like to limit this kind of thing in the RPD, preferring instead to put it in the database. As much as we'd like to believe it, OBIEE will not be the only application accessing this data. But I digress.

Here's the original Oracle SQL:
SUBSTR( col1, INSTR( col1, '/', -1 ) + 1 )
Which reminds me of something else...there is no real way to test this stuff in the admin tool (RPD). You have to create it there and then create an ad-hoc report to make sure it's working as it should. Rather than deal with that, I just started in Answers.

First go:
EVALUATE( 'SUBSTR( %1, INSTR( %1, '/', -1 ) + 1 )', '/TESTING/TESTING1/TESTING2/REPORT_NAME' )
This resulting in the following when I hit OK:



OK, my bet is that those single quotes inside the single quotes were the cause. So I tried variations of 2 single quotes, 3 single quotes and even double quotes. None of those worked either.

What if I just put that '/' in the parameter list?
EVALUATE( 'SUBSTR( %1, INSTR( %1, %2, -1 ) + 1 )' , '/TESTING/TESTING1/TESTING2/REPORT_NAME', '/')
Voila! Yay for me.

Labels: , , , ,

 
Comments:
thanks ! simple and efficient
 
Post a Comment

Subscribe to Post Comments [Atom]



Links to this post:

Create a Link



<<Home

Baby Nelson



Guest Authors

How To

Previous Posts

Archives
August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 / May 2009 / June 2009 / July 2009 / August 2009 / September 2009 / October 2009 / November 2009 / December 2009 / January 2010 / February 2010 / March 2010 / April 2010 / May 2010 / June 2010 / July 2010 / August 2010 / September 2010 / October 2010 / November 2010 / December 2010 / January 2011 / February 2011 / March 2011 / April 2011 / May 2011 / June 2011 / July 2011 / August 2011 / September 2011 / October 2011 / December 2011 / January 2012 / February 2012 / March 2012 / April 2012 /


Aggregated by OraNA OraDBPedia