Syntax for Evaluate function in OBIEE

Hi
I have browsed through the docs but couldn't find syntax for Evaluate function. Could someone pass me the full syntax and if possible a helpful example against essbase.
Thanks

Hi
definitely
syntax:- EVAULATE('your db function(%1,%2)', parameter list)
here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
following exapmples are for ORACLE db,
ex1: EVALUATE('upper(%1)', 'kishore kumar') gives the result as -> KISHORE KUMAR
ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
you also can call the user-defined functions through evaulate
EVALUATE('functioname(%1,%2), column1, column2)
the above function has 2 parameters to be inputted
Thanks & Regards
Kishore Guggilla
Edited by: Kishore Guggilla on Jan 16, 2009 11:00 PM

Similar Messages

  • Syntax for EVALUATE function - placing condition in it

    Hello All,
    I have a formula in discoverer like this
    SUM(col1)
    OVER(PARTITION BY col2, col3, col4
    ORDER BY col5 ASC
    RANGE BETWEEN col6-3 AND col6
    I need to implement the same in BI,
    I have used this to implement the SUM part
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5)' as double,
    col1,
    col2,
    col3,
    col4)
    But, couldn't get the syntax for 'RANGE BETWEEN' clause..
    i have tried like this
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5 RANGE BETWEEN %7 AND %6 )' as double,
    col1,
    col2,
    col3,
    col4,
    col5,
    col6,
    col7)
    Its throwing an error 'ORA-00905: missing keyword at OCI call OCIStmtExecute.'
    can anyone please suggest me some ideas to resolve this.
    Thanks in advance,
    Raghu

    Hi Goran,
    Thanks for the reply, it was of great help..
    Can you once check this please
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4,%5
    ORDER BY %6 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )' AS DOUBLE,
    "Global Distributor Sales (by Period)"."Net Sales",
    Specialist."Specialist Group Name", Specialist."Specialist Manager Name",
    Specialist."Specialist Name", "End Sold-To Customer"."Sold-To Customer
    Account Name", "Process Fiscal Period Calendar"."Fiscal Period")
    This is giving the running sum of values with in the partition window..
    but, can you suggest, how to modify the query, so as to get the values of 'Sales' between
    2 fiscal periods back and the current fiscal period..
    in the discoverer it is used like this,
    SUM(Net Sales SUM)
    OVER(PARTITION BY Specialist Group Name,Specialist Manager Name,Specialist Name,"Sold-To Customer Account Name",GPH Segment2
    ORDER BY "Fiscal Period (7)" ASC
    RANGE BETWEEN NUMTOYMINTERVAL("Fiscal Period Of Year"-1,'MONTH') PRECEDING AND CURRENT ROW )
    which gives the values between 2 periods back and current period
    Thank you,
    Raghu

  • Evaluate function in OBIEE

    Hi All,
    I tried using Evaluate and Evaluate_Aggr in the column formula of a report.
    Evaluate_Aggr() is erroring saying the dimension Work Order is incorrectlly defines logical Table Source Mapping for a dimension of Work Order. If I revoke the implicit fact coniguration on this Subject Area which I have, the report executes as expected. But this implicit configuration is required in my scenario for other reports to work.
    Using Evaluate() works perfectly.
    Can anyone help me in fixing this?
    Shld I add any other configuration in the RPD to resolve this issue?
    Thanks

    996933 wrote:
    hi all
    i got this error when i try to execute evaluate function in obiee answer
    nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT DGN_TIME_RES_USAGE_CUBE.DRTCLN_WO_NO, DGN_TIME_RES_USAGE_CUBE.HOURS, DGN_TIME_RES_USAGE_CUBE.PROJ_NO, EVALUATE('FUNC_FIND_EMPLOYEE_DESC(%1,%2,%3)','KASA',DGN_TIME_RES_USAGE_CUBE.DRTCHD_EMP_ID,1), RMAX(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE), RMIN(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE) FROM LIVE2 years back post from the next time open new thread ? (Business Intelligence Suite Enterprise Edition )
    Thanks,
    Saichand

  • Use EVALUATE function in obiee

    Hi ALL
    i hv a database query like this;
    select
    deptno,
    rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enamesfrom
    emp
    group by
    deptno;
    now, i want to use this using Evaluate function in obiee column formula.
    thn how to do it.
    Please reply.
    THX
    SAP

    Hello SAP,
    I have seen you for sometime and one thing I came to know is you are creating threads and once you got your solution or you dont feel to follow up you are just leaving the thread.
    see few here,
    Sorting month name
    Drill down problem
    Re: Filter in Union Request
    so please better close the threads which are answered and proceed further.

  • Is there any alternative for Evaluate function

    Hi all
    Can anybody tell me the alternative for evaluate function. i have to use a SQL Function and execute it from obiee

    Agreed with John. You best create a view in the DB or - if you don't have the rights - you can just put this SQL code in the physical layer as a physical table object of table type "Select".
    In UDML:
    DECLARE TABLE "ABC".."SH"."test" AS "test" UPGRADE ID 1 NOT CACHEABLE NO INTERSECTION
         TABLE TYPE SELECT DATABASE MAP (
               {DefaultMulDB}  AS {select a.job_id,
         a.name title,
         flsa.meaning flsa,
         eeo.meaning eeo_category,
         a.attribute1 job_family,
         c.name grade
    from per_jobs a,
         (select * from per_valid_grades where sysdate between date_from and nvl(date_to, sysdate + 1)) b,
         (select * from per_grades where sysdate between date_from and nvl(date_to, sysdate + 1)) c,
         (select lookup_code, meaning from hr_lookups where lookup_type like 'US_EXEMPT_NON_EXEMPT') flsa,
         (select lookup_code, meaning from hr_lookups where lookup_type like 'US_EEO1_JOB_CATEGORIES') eeo,
         (select lookup_code, meaning from hr_lookups where lookup_type like 'ALB_HR_JOB_FAMILY') jf
    where sysdate between a.date_from and nvl(a.date_to, sysdate + 1) and
         b.job_id (+) = a.job_id and
         c.grade_id(+) = b.grade_id and
         flsa.lookup_code (+) = a.job_information3 and
         eeo.lookup_code (+) = a.job_information1 and
         jf.lookup_code (+) = a.attribute1}  )
         PRIVILEGES ( READ);Cheers,
    C.

  • Problem in passing varchar2 parameter to Evaluate function in OBIEE

    Hi there,
    This is regarding an issue while passing parameter in EVALUATE function.
    I have to call a function with varchar parameters. parameter are nothing but my table column values.
    I've created session variables which holds value from my table column values.
    for eg:
    EVALUATE('REP1_FIRSTMONTH_F(%1)' AS  CHARACTER ( 30 ),  VALUEOF  (NQ_SESSION."month"))
    so whenever i call function using EVALUATE in OBIEE. i hve to pass ' ' (single quotes) for my varchar values. without this , i'm facing error stating :
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59015] The requested column PERIOD0 does not exist in this table. (HY000)*
    If i'll give parameter within single quotes in my dashboard prompt. it is working fine, but fails without the quotes.
    kindly help me in solving this issue.
    Thanks - Vijay
    NOTE: parameter are from column values.

    Hi
    Anyone has any input for the above issue??. Please share.
    Regards - Vijay

  • Syntax for existing function-based index

    Hi:
    I am on 10.2.0.3.
    Listed below is the list of indexes and index columns on one of the tables. Aparantly one of the columns (SYS_NC00220$ ) is in reality a function-based index.
    Anybody knows how to get SQL syntax for this index? TIA.
    INDEX_NAME UNIQUENES COLUMN_NAME COLUMN_POSITION
    PS0BI_HDR NONUNIQUE BILL_TO_CUST_ID 1
    PS0BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS0BI_HDR NONUNIQUE SYS_NC00220$ 3
    PS1BI_HDR NONUNIQUE BILL_STATUS 1
    PS1BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS1BI_HDR NONUNIQUE SYS_NC00220$ 3
    PS2BI_HDR NONUNIQUE CONTRACT_NUM 1
    PS2BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS2BI_HDR NONUNIQUE SYS_NC00220$ 3
    PSABI_HDR NONUNIQUE INVOICE 1
    PSABI_HDR NONUNIQUE BILL_TO_CUST_ID 2
    PSABI_HDR NONUNIQUE BUSINESS_UNIT 3
    PSABI_HDR NONUNIQUE BILL_STATUS 4
    PSBBI_HDR UNIQUE PROCESS_INSTANCE 1
    PSBBI_HDR UNIQUE BUSINESS_UNIT 2
    PSBBI_HDR UNIQUE INVOICE 3
    PS_BI_HDR UNIQUE BUSINESS_UNIT 1
    PS_BI_HDR UNIQUE SYS_NC00220$ 2

    query user_ind_expressions and look for COLUMN_EXPRESSION.
    this will give you expression.

  • Syntax for @MDSHIFT function

    I'm attempting to create matrix type results for several accounts, displaying a rolling 12 months. An alternate hierarchy is one solution, but would like to try a calcscript using @MDSHIFT."Incomeprior" =@MDSHIFT("MTotalIncome", 1, "2002", , 0,"Income Stmt Accounts",);The error received is "The 2nd parameter of function "2002" must be a non-negative number or Lev/gen name string"Any ideas?Thank you in advance,Cbucklin

    Hi
    definitely
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'kishore kumar') gives the result as -> KISHORE KUMAR
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Jan 16, 2009 11:00 PM

  • What is the syntax for calling function from class file by jsp

    does anyone here knows what is the syntax of how to call a function from java class file by javascript code or any way to call it?
    and where should i put the calling function code? because the function is called depend on the user click.
    for example
    <%=pc.functionName(a,b)%>
    for the variable a and b, how can i get the value from html textbox and put it in a and b...
    urgent needed...
    thx

    Jsp's are executed before the Html forms are created and loaded. Dont try to use a java code function calling on a javascript click. You'll have to explicitly redirect it into a servlet where in you can call the function you want.
    Well! another way could be using AJAX. That seems to be powerfull enough and it might also serve your purpose.
    Hope this helps

  • Proper syntax for email function including a repeat region

    Hey Guys, a fellow ADDT developer and myself ran into a odd challenge recently and was wondering if someone knew a shorter answer.
    LET ME BE CLEAR..I’m not looking for a suggestion, we have resolved the problem..we ARE LOOKING FOR PROPER or shortest FORMAT.
    (we used a submit redirect to a php page that used the “Send Page Section”  and then redirected back..the email looks great)
    This may be a mood point since ADDT is going away but, until then, we feel this will be an useful post because quite often you may have multiple products to email from your SQL statement.
    With that said. We used the send email function on submit.
    1.       Our email content was a HTML content file. Since it was not a php file our repeat region obviously did not work.
    2.       We substituted the HTML file for PHP (just for giggles)..no joy
    3.       We tried regular content as a string..no joy
    We know how to get single rows with the  {table.column} format…but we need to list all undetermined number of products/rows.
    So how would the string or function re-write look  if you needed a repeat region.
    EX:
    emailContent (“ this” . ‘does’. “work”);  regular string
    emailContent (“ this” . $var   . “work”);  regular string
    emailContent (“ this” .   do{  $row; } while( xxx = xxx)  . “work”);  DOES NOT WORK
    emailContent (“ this” .   while( xxx = xxx)  {  $row; }   . “work”);     DOES NOT WORK
    I assume the conflict is you can’t have a function like DO or While in the string….but I also can’t use a php include file.
    There must be a shorter, cleaner syntax that won’t require an advanced set of arrays or for each???
    so  how would a nice clean example of  repeat region results  inside email content, or include file for email contnent, look?
    Thanks

    David, in theory I agree with you, but to a large degree I am completely changing the logic of my human interface. My existing code pre-processes the raw data and saves the results to disk for any future usage. 
    It can then rapidly rebuild all pages for the entire Intranet site when your personal view of the data is changed. 
    After the full creation of all pages, the fixed pages can be viewed using your browser. 
    When you want to change your view, you run the code which completely rebuilds every Intranet page.
    My new software will approach the data differently.  My raw data will be stored with no pre-processing. The pre-processing will occur as the user changes dates and the pages will be built individually on demand, one at a time.
    The second phase of my Windows Form app will be to create pop-up windows that allow the users to modify the definitions for their custom views of the market. 
    When a view is changed, the software will be able to pre-process, as needed, the current date’s data and rebuild the current page with any new changes.
    I intend to create a Refresh.cpp file.  The various segments of the Form’s code will set variable such as date change, view changed, watch list changed, etc. and then call Refresh(). 
    The refresh code will then be able to do the minimum recalculation necessary to rebuild the proper HTML stream. 
    This is another reason to break up the code into various cpp segments such as: LoadRawData, RecalculateViews, BuildPage, etc.
    PS: David, I tried to send you a personal e-mail using your home page link. 
    Hope that was OK and not against forum rules!

  • Date Syntax for SUMIFS Function

    Converting my accounting from Excel to Numbers. Huge data sets ...
    I have a SUMIFS function that works properly using a manually typed date but I cannot figure out how to use the Today() function.
    This works: SUMIFS(Amounts, Account, B3, Check Date, B5) where B3 is the code for the specific account and B5 contains <=12/31/2009 - note there are no quotes around the expression.
    BUT, I don't want to manually enter the date everyday. I want to use the Today() function for condition. It works if I use Today() in B5 but returns only the totals for today's transactions. I need to be able to use "less than or equal to Today" for the condition but I cannot figure out the syntax.
    If we can figure that out, then I want to use "less than or equal to Today PLUS X" where X is a variable I can enter in B7 to look at projected cash flow 7, 14 or 21 days out.
    Any help? Thanks

    Jane Knox wrote:
    Yvan!
    That worked. Thank you! When I posted the question I thought you would be the one to answer.
    Thanks for the feedback.
    I'm sure that Ashka, Badunit, Barry, Fruhulda, Jaxjason, Jerrold … are able to respond the same.
    The difference is that I was in front of my computer when they weren't
    I would NEVER be able to figure that out
    Not surprising, the syntax required to use a reference to a cell in a testr is not described in delivered resources.
    Very different from Excel...
    Happily, Numbers isn't duplicating Excel behaviour. A world with a single kind of spreadsheet would be really annoying
    Yvan KOENIG (VALLAURIS, France) samedi 26 décembre 2009 18:12:19

  • Syntax for nested function/procedure?

    Hi,
    What's the syntax to create a sub function/procedure in another function/procedure? Is this available in 9i?
    Thanks.

    Nested functions and procedures have been available since at least 7.3. However, any nested functions or procedures need to be the last things in your declare section.
    This works:
    SQL> CREATE OR REPLACE PROCEDURE test_proc is
      2     l_v VARCHAR2(100);
      3     FUNCTION nested_function RETURN VARCHAR2 IS
      4     BEGIN
      5        RETURN('nested function call') ;
      6     END;
      7  BEGIN
      8     l_v := nested_function;
      9     DBMS_OUTPUT.Put_Line(l_v);
    10  END;
    11  /
    Procedure created.But this does not:
    SQL> CREATE OR REPLACE PROCEDURE test_proc is
      2
      3     FUNCTION nested_function RETURN VARCHAR2 IS
      4     BEGIN
      5        RETURN('nested function call') ;
      6     END;
      7     l_v VARCHAR2(100);
      8  BEGIN
      9     l_v := nested_function;
    10     DBMS_OUTPUT.Put_Line(l_v);
    11  END;
    12  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE TEST_PROC:
    LINE/COL ERROR
    7/4      PLS-00103: Encountered the symbol "L_V" when expecting one of the
             following:
    12/0     PLS-00103: Encountered the symbol "end-of-file" when expecting
             one of the following:
             begin function package pragma procedure formTTFN
    John

  • Which is correct Syntax for IN function in SQL expressions filters?

    Hi,
    I want to build a report which looks at the last 4 snapshot dates.
    I obtained each snapshot date using this filter
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 7 - dayofweek(current_date) + 2), current_date) ) A
    now the second one would be:
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 6 - dayofweek(current_date) + 2), current_date) ) B
    third one
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 5- dayofweek(current_date) + 2), current_date) ) C
    4th one
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 4 - dayofweek(current_date) + 2), current_date) ) D
    to simplify them let's call the filters A, B , C, D
    so, my sql expression should be like something like Snapshot Date."Snapshot Date" in 'A', 'B', 'D', 'C'
    I have tried to combine the below, with brackets and comma separated, without brackets, with single quotes and without, but I always get a syntax error.
    Snapshot Date."Snapshot Date" in TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 7 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 6 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 5 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 4 - dayofweek(current_date) + 2), current_date) )
    It doesn't seem to like the IN function either.
    Any idea?
    Regards
    G.
    Edited by: user6185307 on Oct 27, 2009 8:07 AM

    Take each of these filters and union them in your answers report.
    This way, you filter down to exactly the last 4 days.

  • Syntax for CASE Function when multiple values equates to the same result?

    Tried using the 'IN' keyword with the CASE function but it does not work, does each case have to be stated separately? trying to save some lines..
    tried:
    case me607.rmc_code
    when in ('M','MS','MP') then 'H311'
    end as carrier_code
    Do i have to do:
    case me607.rmc_code
    when 'M' then 'H311'
    when 'MS' then 'H311'
    when 'MP' then 'H311'
    end as carrier_code,
    etc..
    Thanks for any help..

    One other thing forgot to ask, how do you do a second case selection as:
    case when me607.rmc_code
    in ('M','MP','MS') then 'H311'
    case when me607.rmc_code
    in ('1','2') then 'H252'
    end as carrier code
    wanting to keep the results in carrier_code..
    Thanks..
    Edited by: user12296489 on Dec 10, 2009 3:53 PM

  • Is this a valid syntax for main() function

    hi
    here is a very basic question...
    is this signature a valid entry point to an application..?
    public static int main(String[] arg)
    i compile it and it gives me no error but when i run it, it throws an exception in main...
    I am asking this question because one of the certification books has a question which says that this is a valid signature.
    please do let me know ur comments...
    thanks a lot.

    thanks for all the replies....
    it compiles and here is the run time error that i get
    Exception in thread "main" java.lang.NoSuchMethodError: main
    also the book is Complete Java2 Certification study guide 2nd Ed Sybex
    chapter 1, page 26, question 3.
    which of the following sig. are valid for the main() method entry point of an application
    a> public static void main()
    b> public static void main(String arg[])
    c> public void main(String[] args)
    d> public static void main(String [] arg)
    e> public static int main(String [] arg)
    so the answers shud be b,d and not b,d,e right?
    thanks

Maybe you are looking for

  • How do I turn off the Voice Over for my Mac?

    When the clock struck midnight, September 18th, a VoiceOver utility box came and popped up in my face for my MacBook Pro and I would like to know how to turn it off besides just muting and hiding the text boxes because there are still little chimes t

  • Changing Payment Terms for a BP

    Hello, Please could you clarify what this message would do if the we selected yes or no: "Do you want the system to replace all associated payment term settings automatically?" We have changed the payment terms under the BP master data from  30 days

  • Network settings for ipod update

    I'm trying to get my i pod updated and I keep getting this error "Server can not be contacted. Make sure network setting are correct and try again" What doed that even mean?

  • Handling SAP deep structure via JCo

    Hello- I have an RFC enabled function module in my ECC 6 system that I'd like to call using the JCo API's. I have read conflicting materials on whether this is even possible or not. Can anyone confirm if it is possible or not, and if you have a gener

  • Shared Services Framework (AIC and EIC) configuration - Basis Side

    Hello Experts, We are trying to configure AIC and EIC modules under the shared services framework of CRM, do you have any guides on how to configure / activate those modules related on the SAP BASIS side. Thank you in advance for your answers Cheers,