Using EVALUATE function

Hello to all!
I have a problem using EVALUATE function in BI report column. In my schema I have created stored function.
Call looks like
evaluate('PKG1.GET_STAMP_DATE(%1)' as date,"Доп. аналитики"."Документ")
Состояние: HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 904, message: ORA-00904: "PKG1"."GET_STAMP_DATE": invalid identifier at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
I tried function IN package and OUTSIDE package. The same.
What's wrong???
Tnanks in advance...

Hi,
Check this function in database wether it is working or not.
The identifier (column name, function, …) entered is invalid or unknown.
This can have a number of reasons:
It can be an unknown function, a column name that does not belong to a table, an invalid table alias, …
The following function is not known
SQL> select unknown_function from dual;select unknown_function from dual
*ERROR at line 1:
ORA-00904: "UNKNOWN_FUNCTION": invalid identifier
The following column does not exist in the table:
SQL> select X1 from dual;select X1 from dual
*ERROR at line 1:
ORA-00904: "X1": invalid identifier
Please refer the below thread might be help u..
DB Function errors out when trying to use in both Answers and RPD file.
Urgent: Error while displaying data in OBIEE answers
Thanks,
Satya

Similar Messages

  • Can we use Evaluate function in Prompt

    Hi all
    Can we use Evaluate Function in Dashboard Prompt?
    I need some exposure on how to use it.
    I am working on a HRMS-OLTP Source where I need to work with Oracle Functions from OBIEE.
    IF somebody can tell me that, It will be a favour for me....
    ThanQ
    Anand V

    Hi All,
    Here's an example of how to use evaluate. This use calls the Oracle TO_DATE function: EVALUATE('TO_DATE(%1,%2)' as DATE, '03/03/2009', 'MM/DD/YYYY')
    Here's how it works: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Can we use Evaluate Function in Dashboard Prompt

    Hi
    Can anybody tell me
    Can we use Evaluate Function in Dashboard Prompt.
    If yes...How
    Thanks in Adv

    Yes ! You Can!
    while creating the dashboard prompt, under "Show" pick SQL results and you write the SQL statement and include the EVALUATE function.
    I have several such examples. Most of of dashboard pages are parameter driven.
    1. 1st paratmeter - users specify the dates
    2. 2nd parameter - constrains the results for the period specified in 1st paramter and my SQL for 2nd paramter looks like this -
    SELECT table1.column1
    FROM table, datedim1, table1,table2
    WHERE datedim1.date BETWEEN EVALUATE( 'TO_DATE(%1,%2)','@{presentation variable1}','dd/mm/yyyy') AND EVALUATE('TO_DATE(%1,%2)', '@{presentation variable 2}','dd/mm/yyyy')
    HTH
    Mahesh

  • 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.

  • Best practices on using EVALUATE functions

    hi, experts,
    I wanna know what is the best practices on using EVALUATE functions on obiee (calling oracle user defined functions)
    I found that if I use evaluate functions in Answers,
    obiee will construct a sql behind and then execute.
    sometimes, obiee contructs some unexpected sqls, and returns errors.
    so, is it better to use EVALUATE functions in logical columns ?
    thanks

    EVALUATE('DB_Function(%1)' as returntype, {Comma separated Expression})
    even when used in Logical columns, its gonna fire the same sql.

  • How to use evaluate function for sql server function

    Hi Team,
    We have imported a column(date dtat type) from SQL server cube . By default it imported as varchar,. We have three option in physical layer for this column(Varchar,Intiger,unknown)
    So we want to convert this column into date.can we use evaluate or there is any option to do that.?

    Hi,
    I am not sure your requirement. But how pass evaluate function obiee?
    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)', 'satya ranki reddy') gives the result as -> SATYA RANKI REDDY
    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
    Hope this help's
    Thanks
    Satya

  • Calling databse function from report end. Using Evaluate function.

    Hi All,
    We have a req where we need to call the backend functions from the report end. I have seen that Evaluate function can be used to do the same. I tried replicating the same same but it didnt work.
    Can any one please elaborate more on this. Syntax & other details. We need to also pass on parameters to the function, probably some column value.
    Also please do let me know where all changes need to be done... RPD etc if applicable.
    This is the functiion we need to replicate in OBIEE.
    Nvl(dwh.dwh_pa_get_si_value_f(Pa_Projects_All_V.Project_Id,Pa_Periods_All_V.Period_Name,-1,Dwh_Pa_Project_Si_Info.Currency_Type,Dwh_Pa_Task_Si_V.Task_Number,'R'),0)
    Thanks,
    Pankaj

    Hey Pankaj,
    I got solution for your issue...
    Under any logical table.. you create a logical column and
    Select Existing logical columns as source checkbox
    Click on Eclipse button..
    Now here you write..
    EVALUATE('dwh.dwh_pa_get_si_value_f(%1,%2,%3,%4,%5)' ,Pa_Projects_All_V.Project_Id,Pa_Periods_All_V.Period_Name,-1,Dwh_Pa_Project_Si_Info.Currency_Type,Dwh_Pa_Task_Si_V.Task_Number,'R')
    And click ok..
    Hope it works..
    it worked for me..
    Thanks & Regards
    Kishore Guggilla

  • Error while using Evaluate function

    Hi ,
    I am using the following expression in the criteria tab in order to get first value for every customer order by date:
    EVALUATE('FIRST_VALUE(%1) OVER (PARTITION BY %2  ORDER BY %3)' AS INTEGER, "Fact - Customer SubLedger"."TRANSACTION AMOUNT",Customer.CUST_ACCOUNT_NUMBER,"GL Date".DAY).
    When I try to execute the report it throws following error :
    *[nQSError: 42015] Cannot function ship the following expression: Evaluate( FIRST_VALUE(%1) OVER (PARTITION BY %2 ORDER BY %3),D1.c4, D1.c2, D1.c13)*
    Can anybody help me with this? Where am i going wrong?
    Regards,
    Vikas

    Hi Kishore,
    I am using the exactly same formula which you have mentioned here still it is giving me the same error.
    EVALUATE('First_value(%1) over (partition by %2 order by %3)' AS  DOUBLE , "Fact - Customer SubLedger"."OPENING BALANCE",Customer.CUST_ACCOUNT_NUMBER, "GL Date".DAY)
    Error : *[nQSError: 42015] Cannot function ship the following expression: Evaluate( First_value(%1) over (partition by %2 order by %3),D909.c9, D909.c3, D909.c14)*
    Can't say why it is behaving like this.
    Anyways thanks all of you for your help.
    May be I am going wrong somewhere else.I will try to solve this issue by myself.
    Once again thanks to all of you.
    Regards,
    Vikas

  • Equivalent of to_date function in Ms SQL and using it in Evaluate function

    Hi,
    I am trying to find out a function in MS SQL which is equivalent to to_date function in oracle. Please find below the advanced filter i am trying to use in OBIEE.
    Evaluate('to_date(%1,%2)' as date ,SUBSTRING(TIMES.CALENDAR_MONTH_NAME FROM 1 FOR 3)||'-'||cast(TIMES.CALENDAR_YEAR as char(4)),'MON-YYYY')>=Evaluate('to_date(%1,%2)' as date,'@{pv_mth}'||'@{pv_yr}','MON-YYYY') and Evaluate('to_date(%1,%2)' as date ,SUBSTRING(TIMES.CALENDAR_MONTH_NAME FROM 1 FOR 3)||'-'||cast(TIMES.CALENDAR_YEAR as char(4)),'MON-YYYY') <=timestampadd(sql_tsi_month,4,Evaluate('to_date(%1,%2)' as date,'@{pv_mth}'||'@{pv_yr}','MON-YYYY'))
    The statement above works fines with oracle DB with to_date function. The same statement throws an error with MS SQL since to_date is not a built in function.
    With MS SQL I tried with CAST, not sure how to pass parameters %1 and %2.
    Please help me how to use Evaluate function and passing parameters along with to_date funtion in MS SQL.
    Regards!
    RR

    Hi,
    please refer to this thread for useful information on using to_char and to_date functions of oracle in MS SQL server:
    http://database.ittoolbox.com/groups/technical-functional/sql-server-l/how-to-write-to-to_char-and-to_date-sql-server-351831
    Hope this helps.
    Thanks,
    -Amith.

  • Evaluate function error! how to use it properly?

    Hi,
    I used evaluate function to use a user-defined stored function present in my DB. But I ended up with this error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtExecute: select distinct T119198.BCREFNO as c1, T119198.MATURITY_DATE as c2, T119198.BILL_DUE_AMT as c3, test_eval('"Contract BC Parameters Fact"."Bill Amt Lcy"') as c4 from BCTBS_CONTRACT_MASTER T119198 /* BC_BCTBS_CONTRACT_MASTER */ order by c1, c2, c3, c4. [nQSError: 17011] SQL statement execution failed. (HY000)
    I used the following evaluate function in my report under Edit Column Formula of the particular field.
    EVALUATE('test_eval(%1)','"Contract BC Parameters Fact"."Bill Amt Lcy"')
    The test_eval function in my DB takes one parameter of type number and returns a number. The "Contract BC Parameters Fact"."Bill Amt Lcy" field is of DOUBLE type as found in BMM layer.
    I wish to know if I am right by placing the evaluate function in report or should I use it in BMM layer? Can I get anybodies assistance in knowing how to arrive at using a DB user-defined function in a report.
    Regards,
    The MasterMind.

    hi,
    This is the syntax
    *EVALUATE('DB_Function(%1)' as returntype, {Comma separated Expression})*
    Please check this post
    Re: Syntax for Evaluate function in OBIEE

  • Evaluate function not working in obiee 11.1.1.7

    Hi all,
    I have completed In-place upgrade from obiee 11.1.1.5 to 11.1.1.7.
    After this I am getting an error while running reports,which is created by using evaluate function.
    [nQSError: 43113] Message returned from OBIS. EVALUATE_SUPPORT_LEVEL inside NQSConfig.INI is not set to support EVALUATE
    In my NQSconfig.ini I coundnt find EVALUATE_SUPPORT_LEVEL. So I have added below content in NQSConfig.ini file
    # EVALUATE_SUPPORT_LEVEL:
    # 1: evaluate is supported for users with manageRepositories permssion
    # 2: evaluate is supported for any user.
    # other: evaluate is not supported if the value is anything else.
    EVALUATE_SUPPORT_LEVEL = 2;
    After that I restarted BI services. But still I am facing same error.
    Guide me regarding this.
    Thanks in advance.

    Are you using any parameter like % or / , If you are using,Then it is a bug in 11.1.1.7,Check the below URL for more info.
    http://obiee-blogs.blogspot.com/2013/04/obiee-11g-bugs-fixed-in-111170.html
    bug 13386728 - EVALUATE FORMULA FAILS IF PARAMETERS HAS % OR /
    Mark if helps.
    Thanks,

  • Evaluate Function in case when

    hi,
    i want to use evaluate function in case when statement.My req is
    if report_date=8/31 and sales_qty>30....show 1
    if report_date=7/15 and sales_qty>39...show 2..
    in the formula section i am using
    case WHEN "Fact- table"."Report  Date"=evaluate('to_date(%1%2)',"Column_name",'DD/MM
    /YYYY')) AND "Fact-table"."Sales_qty">30 THEN '1'  ELSE '0' END Report date data type is date only...Its giving an error date format is not supported
    Please help me out!!

    hi,
    thanks for u r quick response,i tried the code what u sent by its giving the error
    A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( to_char(%1,%2),cast(D1.c7 as DATE ) , 'MM/DD/YYYY') ADa.....
    I tried in sql its giving correct results
    SELECT * FROM table WHERE report_month=To_Date('15/09/2009','dd/mm/yyyy')
    how to use the same in obiee?
    thanks
    Edited by: saichand on Oct 26, 2009 3:17 PM

  • Evaluate function

    How can we achieve this below using  EVALUATE function in obiee. I can use cast to do this but i need to use EVALUATE for my purpose.Can someone please throw light on this.
    to_char(date_column,'MM')

    Srini,
    Here is my issue
    I want to implement below function in obiee.It  takes the month from the column and appends the current year .so basically if the column has the value 01/12/12.It becomes 01/12/13.P_year is a current year variable.I am having issues in writing the above code in obiee.I am using the below in obiee which is giving the below error.
    SQL FUNCTION:  to_date(to_char(Date_Column)||'-'||:current_year,'MM-YY') 
    OBIEE:CAST(CAST(MONTH("date_column") AS CHAR) ||'-'||CAST(VALUEOF("current") AS CHAR)as date)
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 1843, message: ORA-01843: not a valid month at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)
    Please help were i am doing wrong.This is the reaon i want to do this using EVALUATE function.

  • MDX Generation Issues (using Evaluate) in OBIEE Analysis Report

    Hello Everyone,
    I am trying to use Evaluate function in MDX (on a OBIEE 11g Analysis report) to restrict the number of values that i am pulling from the Essbase cube. The MDX Evaluate syntax looks something like this
    EVALUATE('TOPCOUNT(%1.members,100,([Dimension1],[Dimension2],[Dimension3],[Dimension4]))',"Accounts"."Gen10,Accounts")
    EVALUATE('TOPCOUNT(%1.members,100,([Dimension1],[Dimension2],[Dimension3],[Dimension4]))',"Products"."Gen10,Products")
    I am putting the above evaluate formula in the "selected columns" on the OBIEE Analysis report. So i am pulling accounts, products and the measure from the essbase cube.
    However I am getting the following error when the analysis report is run
    Query Status: Aggr Essbase Error: *Repeated dimension [Accounts] in MDX query*
    Do we need any configuration changes/ settings on the RPD model to ensure we dont get this error?
    Regards
    Aby

    Hi veeravalli,
    Thank you for you reply. I got it.
    However, any idea to solve the issue?
    I tried to do it in RPD by case when,
    e.g. Acutal Sales: case when scenario='Actual' then salesamount end
    Budget Sales: case when scenario='Budget' then salesamount end
    Actual/Budget%: (Actual Sales/Budget Sales) *100
    So there is no error, Actual Sales and Budget Sales are correct, but Actual/Budget % shows nothing in report
    Thanks.
    BCHK

  • Evaluate function problem

    I have a problem with EVALUATE function in OBIEE.
    I passed two parameters. Number is numeric and Name is varchar.
    Evaluate('DWH.PKG_ITEM_FUNCTION.PS_LAW(%1,%2)', "Book"."Item"."Number", "Book"."Item"."Name" )
    I get the following error:
    [nQSError: 22027] Union of non-compatible types.
    How can I solve this?
    Many thanks in advance.

    hi stanisa,
    It is a bug in 10g,here it goes
    --> While using Evaluate function, common errors like “Union of non-compatible types. (HY000)”.
    I believe this is a bug in the Evaluate function implementation. One must cast all the arguments to the same data type before passing them as arguments.
    Courtesy :- http://oraclebizint.wordpress.com/2007/10/18/oracle-bi-ee-101332-top-10-common-errors/
    hope helps you.
    Cheers,
    KK

Maybe you are looking for