Query Report Error ( Call function inside Query report )

Hello every body,
I'v database Oracle 11g R2 and i have Apex 4.1 , when i run my report with a simple query :
select gydb_wf_id,
gydb_workflow_name,
gydb_work_flow_owner,
FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR
from gybd_workflow ;
I got the following message error :
Query cannot be parsed within the Builder. If you believe your query is syntactically correct,
check the ''generic columns'' checkbox below the region source to proceed without parsing.
ORA-00904: "FUNC_GET_NBR_LAST_STEPS": invalid identifie
Note that i have all privilages on my function (FUNC_GET_NBR_LAST_STEPS) ,
Any issues
Tnahkyou

Hi Yosof      ,
concatenate schema name with your function
for example
select gydb_wf_id,
gydb_workflow_name,
gydb_work_flow_owner,
ABC.FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR  // here i have written ABC as schema name
from gybd_workflow ;try and see it is working or not.
hope it works,
Thanks,
Jitendra

Similar Messages

  • Call function inside running class

    Hey All,
    i have a two question in classes.
    1- i have class and i called its before and its running on runtime. i need to call function inside this class from another class, but without call the first one again, because if i called it, it will run default class function again
    is this doable ?
    2- What super() mean ?
    Thanks a lot.

    this is the default call, and when i call the method by this way its will run the default class function before call the method.
    here my example:
    i need to call checkboxes  function in ChannelsMain class without pass by the grey script.
    Note: the call_cb is working and the trace is working
    so i now the class is running, i need to call the checkboxes without ( var ci:YourClass = new YourClass(); )
    package com.link
         import fl.controls.CheckBox;
         import flash.events.*;
         public class ChannelsMain
              var cbLength:uint = Main.PV.channel_id.length;
              public function ChannelsMain()
                   // constructor code
                   for (var i:int = 0; i < cbLength; i++)
                        var cb:CheckBox = new CheckBox;
                        cb.name = Main.PV.channel_id[i];
                        cb.label = Main.PV.channel_name[i];
                        cb.x = 50;
                        cb.y = 50 + i * 30;
                        cb.addEventListener(Event.CHANGE,call_cb);
                        Main.MS.addChild(cb);
                        //call xml function
                        if(i == cbLength - 1)
                             new ChannelsXML();
              private function call_cb(evt:Event)
                   trace(evt.currentTarget.name,evt.currentTarget.selected);
              public function checkboxes(evt)
                   trace(evt);

  • Report based on function returning query

    Hi all,
    I created a function FCT_1 in a package PKG, here is an exemple :
    function FCT_1(te in number) return varchar2
    is
    q varchar2(4000);
    begin
    if te = '1' then
    q := 'Select * from Clientele';
    else
    q := 'Select * from Compagnie';
    end if;
    return q;
    end;
    And I call this function the region source of my report like this :
    Declare
    q varchar2(4000);
    Begin
    q:=PKG.FCT_1(:P2_Nb); -- P2_Nb = 1 or 2
    return q ;
    end;
    But I got this error :
    report error:
    ORA-01403: no data found
    I need your help.
    Benn

    I got it,
    I just use the Use Generic Column Names (parse query at runtime only) option.
    I don't know why do I have to do it.
    Thanks
    Benn

  • Getting the MDX query select error when running a webi report on BI query

    Getting the following error when running a webi report on BI query :
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[D8JBFK099LLUVNLO7JY49FJKU] }  ON COLUMNS , NON EMPTY [ZCOMPCODE].[LEVEL01].MEMBERS ON ROWS FROM [ZTEST_CUB/REP_20100723200521]  failed to execute with the error Unknown error. (WIS 10901).
    I have gone through many threads related to this error. But not able find the steps to follow for resoultion.
    Please help in this regard.
    Thanks,
    Jeethender

    The Fix Pack is also for Client Tools--it is a separate download.  Please see the text below for ADAPT01255422
    ADAPT01255422
    Description:
    Web Intelligence generates an incorrect MDX statement when a characteristic and a prompt are used.
    The following database error happens: "The MDX query ... failed to execute with the error
    Unknown error (WIS 10901)."
    New Behavior:
    This problem is resolved.
    This information is also available in the Fixed Issues document for any Fix Pack greater than 2.2.

  • Reporting error while execution of query in BI?

    hi friends,
    http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=Q001_SALES&VARIABLE_SCREEN=X&DUMMY=1
    when i am executing my query in 7.0 i am getting 1 extra window with this message. ple let me know solution for this.
    regards
    suneel.

    hi banu,
    whether i need look here bex analyzer or query designer, if i open bex analyzer its showing only 3.x reporting, when i am usnig query designer its showing 7.x reporting, i know reporting well in 3.5 .
    i am using there bex analyzer?
    here in BI what  can i use? analyzer or query designer?
    if i need analyzer why its showing only 3.x reporting.
    if i need 7.x reporting what can i do for my system?
    and also help me that new data to activae data for dso for my demo version wher can i check my oss nores.
    regards
    suneel.

  • Performance issue: CALL FUNCTION inside a Loop.

    Hi Friends
    I have a Performance Issue. That is, inside a loop...endloop a CALL FUNCTION has been used which gets data from another database table. Finally it's appended into another internal table. Please see this :
      LOOP AT i_mdkp.
        REFRESH lt_mdtbx.
        CLEAR lt_mdtbx.
        CALL FUNCTION 'READ_MRP_LIST'
          EXPORTING
            idtnum        = i_mdkp-dtnum
            icflag        = 'X'
          tables
            mdtbx         = lt_mdtbx
        APPEND LINES OF lt_mdtbx TO i_mdtb.
      ENDLOOP.
    It happens for each record available in i_mdkp. Suppose, i_mdkp have around 50000 records, it needs to call the function module till that much time.
    So, I want to split it. Can I?
    Please give me your valueable suggestions.
    Regards
    Senthil

    If internal table i_mdkp has 50,000 records it does not mean that you need to run 50,000 iterations. You just need dtnum from internal table i_mdkp so you number of iterations should be eqaul to the unique number of dtnum in the internal table. Sort the internal table by dtnum and delete adjacent duplicates from the internal table comparing dtnum before looping. Look at the code below.
    DATA i_mdkp_tmp LIKE TABLE OF i_mdkp.
    IF NOT i_mdkp[] IS INITIAL.
      i_mdkp_tmp[] = i_mdkp[].
      SORT i_mdkp BY dtnum.
      DELETE ADJACENT DUPLICATES FROM i_mdkp COMPARING dtnum.
      REFRESH i_mdtb.
      LOOP AT i_mdkp.
        CALL FUNCTION 'READ_MRP_LIST'
          EXPORTING
            idtnum = i_mdkp-dtnum
            icflag = 'X'
          TABLES
            mdtbx = lt_mdtbx.
        APPEND LINES OF lt_mdtbx TO i_mdtb.
        REFRESH lt_mdtbx.
      ENDLOOP.
      i_mdkp[] = i_mdkp_tmp[]
    ENDIF.

  • Interactive report errors when trying to query external table.

    I'm trying to create an interactive report against an external table and getting the following error. I see a note in metalink the describes its cause, but I doesn't seem to apply here.
    Query cannot be parsed, please check the syntax of your query. (ORA-06550: line 2, column 17: PLS-00302: component 'ODCIOBJECTLIST' must be declared ORA-06550: line 2, column 13: PL/SQL: Item ignored ORA-06550: line 4, column 18: PLS-00302: component 'ORACLE_LOADER' must be declared ORA-06550: line 4, column 6: PL/SQL: Statement ignored ORA-06550: line 5, column 12: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 5, column 6: PL/SQL: Statement ignored)
    Metalink Note:437896.1 identifies this same error related to external tables. It says the cause is an object named 'sys' that exist in the user's schema and must be removed. I checked dba_objects and there is no object named 'sys'

    Please ignore thread - operator error. There was an object named sys.

  • ORA-06502 when trying to call a function inside my report

    Hi guys,
    I have the following code in a function to get my open bal for a field in my report but I am getting ORA-06502 every time I try to run it.
    Does any one have any idea as why?
    ================================
    function CF_OPNE_BALFormula return Number is
    v_bal number;
    v_period char;
    v_prv_period char;
    BEGIN
    v_period := to_char(last_day(:p_date_From),'RRRRMM');
    if substr(v_period,5,2) = '01' then
    v_prv_period := to_char(to_number(substr(v_period,1,4))-1) ||'13';
    else
    v_prv_period := to_char(to_number(to_char(:p_date_From,'YYYYMM')-1));
    end if;
    v_bal := csh_acc_pkg.csh_get_acc_bal(:p_own_id,:P_GLA_acc_num,v_prv_period,'F','ACC');
    return(v_bal);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    ====================================================
    Thanks
    Hali

    Try using varchar2 with length specified instead of char in the variable declarations.

  • How to call function in INteractive Report!!

    Hi All,
    After investing on interactive report i have came to know that we can have only sql query but not Dynamic Sql query!
    By using PIPELINED FUNCTIONS we can use dynamic sql in Apex Interactive Reports.
    Here is the url for refernece- http://sungur.wordpress.com/2009/10/11/apex-interactive-reports-with-dynamic-sql/
    When i had tried to implement the the above one it is throwing error as
    Query cannot be parsed, please check the syntax of your query. (ORA-06575: Package or function GET_TABLE_ROWS2 is in an invalid state)
    Can any one help me out how to overcome the scenerio and resolve the problem?
    Since it is urgent can any one help me out to resolve it.
    Thanks in Advance,
    Anoo..

    Hi Anoo,
    Step 4:
    Create a process that will populate the heading page items with the relevant column name values from the dynamic query. This can be done by splitting the select line using the commas and extracting the dynamic column headers.This is Nothing But in Interactive report the column name is taking as a heading for every column, Otherwise we can go to change the column heading in report attributes(STEP 3).
    What they said we can try to change the column head dynamically.
    Like Ex:
    Select ename "Employee Name" from emp;The above Example we are taking ename but it displayed as Employee Name.
    I tried that but its taking 50 columns cant write that much of query.
    Now you got it?
    Cheers,
    Shan..

  • Error in function cursor in report version 9.0.4.10

    I created a funtion with this cursor
    Cursor C2(c_leasecomp lease.leaseid%Type) is
    select distinct sorg.orgid department
    from space_lease sl,spaceorg sorg,org org,
    (select case when (select 1 from space_lease where UOM_STD_ID = 'METR_MTR' and rownum = 1) = 1 then 1
    when (select 2 from space_lease where UOM_STD_ID = 'ACRE' and rownum = 1) = 2 then 2
    else 3
    end case_col
    from dual) d1
    where sl.uom_std_id = decode(d1.case_col,1,'METR_MTR',
    2,'ACRE',
    3,'PARK',
    null)
    and sl.leaseid = c_leasecomp
    and sl.bldgid = sorg.bldgid
    and sl.FLRID = sorg.FLRID
    and sl.spid = sorg.SPID
    and sorg.orgid = org.orgid
    and ( org.ORGCLASS = 'ABC'
    or org.ORGCLASS = 'GD'
    or sorg.orgid IN (select orgid from cst_spaceorg_exception))
    order by sl.leaseid;
    But am having the error below
    Error 103 at line 12 , column 34
    (-+ Case mode not null others<an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance----
    I ran this as an anonymous function is Sql and it worked. Is this the report engine thing or am doing something wrong. The Database is 10g

    Duplicate Report9i not generating more then 50852 pages in PDF format
    Regards,
    Martin Malmström

  • Error calling function in JNI

    Hi,
    I get the following error message when trying to run a JNI application on a Mac. The application runs fine under Windows and I am trying to port to a Mac and am struggling. I've also copied the declarations and definition from the java and c++ header and source files.
    The problem appears to be the calling of the function initWindows as the debugging print statement on the c++ is never displayed.
    "Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: initWindows
         at AvistoGL.initWindows(Native Method)"
    Java file declaration
    public native boolean initWindows();
    Header file declaration
    JNIEXPORT jboolean JNICALL Java_AvistoGL_initWindows (JNIEnv *, jobject);
    cpp file definition
    JNIEXPORT jboolean JNICALL Java_AvistoGL_initWindows(JNIEnv *env, jobject panel)
         std::cout<< "Inside Java_AvistoGL_initWindows"<< std::endl;
         return InitWindowMac(env, panel);
    }

    You include the h file in the cpp file?
    The cpp method is NOT part of any C++ class right?
    What is the package for the java method?
    You load the library in java and do not eat exceptions?

  • Call function inside of call function in back ground task

    Hi Friends,
       I am calling one function in back ground task. that is executing after save of the transaction. And inside of that transaction i am calling one more function but in debugging the cursor is not going inside of that function. What could be the reason. Please help me.
    Thanks a lot in advance.

    Hi,
        Inside of the first function any way i will come after save
    using update task debugging. Once it reach inside of firt function and if i press f5 then second function is coming and if i press f5 there then it is coming out of the function and it is not going inside. The second function is called directly not in back ground.
    Thanks..

  • Query browser error for a Bex query

    Hello,
    I am using Query browser in Dashboards 4.0 to retrieve the data from Bex query. When I select a few dimension measures out of the structure with certain key figures and clicking the preview of the results, I am getting the error message as "Request Processing failed(XLS 000009)[] Error DBMAN(257):SQL Error:58115
    Error RS Exception:Arithmetic overflow error converting" kind of error message.
    When I remove some dimension members which were selected, I am able to see the preview of the data. What could be the probable reason for the above kinda error?
    Thank you.

    These are generic error, please go through the below link and let us know whether its helpful or not.
    Microsoft ODBC data manager not found
    Error during "Add Query" in Dashboard 4.0
    Happy to help you!
    -SumanT

  • Problem calling function inside a procedure

    I have a procedure that simply calls a function, but I'm not sure how to declare it.
    When I run my script oracle returns an error:
    CREATE OR REPLACE PROCEDURE pr_entrada_close(
         var_id_entrada int)
    AS
    BEGIN
         fn_criaJobAnalise(var_id_entrada);
    END;
    ERROR at line 5: PL/SQL: Statement ignored3. AS
    4. BEGIN
    5.      fn_criaJobAnalise(var_id_entrada);
    6. END;

    As far as I know, that structure worked in at least 8.0 and possibly earlier. I actually saw something similar in production code on that version of Oracle. The actual function took several parameters, and using those paramters did a series of statements along the lines of:
    BEGIN
       SELECT 1 INTO l_var
       FROM table1
       WHERE <predicates>
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
          RAISE APPLICATION_ERROR (-20001, 'Error');
       WHEN TOO_MANY_ROWS THEN
          RAISE APPLICATION_ERROR (-20002, 'Error');
    END;
    BEGIN
       SELECT 1 INTO l_var
       FROM table2
       WHERE <predicates>
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
          RAISE APPLICATION_ERROR (-20003, 'Error');
       WHEN TOO_MANY_ROWS THEN
          RAISE APPLICATION_ERROR (-20004, 'Error');
    END;
    -- About 4 or 5 more tables checked
    RETURN 1;and the caller looked kind of like:
    DECLARE
       NO_ROWS_TABLE1 EXCEPTION;
       DUP_ROWS_TABLE1 EXCEPTION;
       NO_ROWS_TABLE2 EXCEPTION;
       DUP_ROWS_TABLE2 EXCEPTION;
       PRAGMA EXCEPTION_INIT (NO_ROWS_TABLE1, -20001);
       PRAGMA EXCEPTION_INIT (DUP_ROWS_TABLE1, -20002);
       PRAGMA EXCEPTION_INIT (NO_ROWS_TABLE2, -20003);
       PRAGMA EXCEPTION_INIT (DUP_ROWS_TABLE2, -20004);
       l_v NUMBER;
    BEGIN
       BEGIN
          l_v := test_tables(<parameters>);
       EXCEPTION
          WHEN NO_ROWS_TABLE1 THEN
             <do something about it>
          WHEN DUP_ROWS_TABLE1 THEN
             <do something about it>
          WHEN NO_ROWS_TABLE2 THEN
             <do something about it>
          WHEN DUP_ROWS_TABLE2 THEN
             <do something about it>
       END;
       <Continue normal processing>
    END;and, yes, <Continue normal processing> occasionally failed for mysterious reasons when more than one of the checks would have failed had the function got to them, and l_v was never ever used.
    This was one of the clevererbits of code in that app.
    John

  • Error calling function in Oracle

    Hi All,
    I am calling the function in Oracle the following way
    cs = conn.prepareCall( "{? = CALL package_name.function_name(?)}" );
    But on the above line in my code, I am getting the error
    java.sql.SQLException: Malformed SQL92 string at position: 5. Expecting "call"
    Did anybody run into same issue?
    Thanks

    Until something slicker comes up:
    try {
    String sql = "select RISK.HVAR_MAINT.FNV_GET_PARTITION_NAME(?,'04-mar-2003') as theValue from dual ";
    // Connection conn = getConnection();
    CallableStatement stmnt = conn.theConnection.prepareCall(sql);
    stmnt.setString(1,"hvar_mtm") ;
    stmnt.execute();
    ResultSet rs = stmnt.getResultSet() ;
    while ( rs.next() ) System.out.println(rs.getString("theValue") ) ;
    rs.close() ;
    } catch (Exception e) {
    System.out.println(e.getMessage() ) ;
    Note: I have not been able to get "CALL" to work in Oracle
    May be the next guy cal get conn.prepareCall( "{? = CALL package_name.function_name(?)}" ); to work

Maybe you are looking for

  • PC Sync has encountered a problem and has terminat...

    I have Version 6.81.13.0 with a Nokia 6680 phone. When I try and synchronise with my Outlook 2002 SP 2, I get the following error from PC Suite. PC Sync information. PC Sync has encountered a problem and has terminated the synchronisation. My environ

  • Text in flash chart legend

    Hi- We are on APEX v3.1.2.00.02 A flash chart has been created and works well, but here is my issue: In the Chart Series query, we have a select (here's a small piece) select total_rfc "Total R.F.C" When the chart is generated, the legend box appears

  • Photo pages on iWeb.

    I've got a site built using iWeb, hosted by a third party (not mac.com). The site includes photo albums that I've added from my iPhoto library. Can I delete the photos from my iPhoto library without having them disappear from the site? Or does the si

  • Will Acrobat Reader recognize an HTML bookmark as a named destination?

    I have a Word file with bookmarks. I make a PDF from this file. How do I code an HTML link in a different file that will open the PDF at the location of a bookmark. I asked a similar but maybe less precise question yesterday. The response I received

  • Can Logic ever be a slave?

    From what I gather it seems like logic cant slave to programs such as Ableton but I would like to know if this issue has been corrected in Logic 8? My aim is to record parts using Logics synths but arrange everything within Ableton. I love the synths