Expression or Function as field in Object Type

I am trying to use an expression or call a function as a return value for a field in an OBJECT TYPE.
Here's the obj def:
CREATE OR REPLACE TYPE OUTAGE_REPEAT_CALL_T2 AS OBJECT (
     INITCALL_TS      DATE,
     LASTCALL_TS      DATE,
     CALL_SRC      CHAR(8),
     ELAPSED_TIME     NUMBER,
     REP_ID           CHAR(8),
     CALL_CNT      NUMBER(3)
The ELAPSED_TIME field should be the differnece in minutes from the LASTCALL_TS and SYSDATE...
I'm not sure how to select into this OBJECT to get my result...
Sample table and data:
SQL> desc oms.outage_repeat_call
Name Null? Type
ACCT NOT NULL NUMBER(10)
INITCALL_TS NOT NULL DATE
LASTCALL_TS NOT NULL DATE
CALL_CNT NOT NULL NUMBER(3)
CALL_SRC NOT NULL CHAR(8)
REP_ID NOT NULL CHAR(8)
The ELAPSED_TIME is not part of the underlying table..
sample data from tbl:
ACCT INITCALL_ LASTCALL_ CALL_CNT CALL_SRC REP_ID
123456 02-JAN-02 02-JAN-02 1 CBIS MJB2302
I want to have this as a result:
INITCALL_ LASTCALL_ CALL_SRC ELAPSED_TIME REP_ID CALL_CNT
02-JAN-02 02-JAN-02 CBIS 9997 MJB2302 1
But by doing a select from the OBJECT TYPE:
i.e.
SELECT OUTAGE_REPEAT_CALL_T2(     ORPC.INITCALL_TS,
                    ORPC.LASTCALL_TS,
ORPC.CALL_SRC,
                    'expression or func' AS ELAPSED_TIME,
ORPC.REP_ID,
ORPC.CALL_CNT)
FROM
OMS.OUTAGE_REPEAT_CALL ORPC
WHERE
ORPC.ACCT=123456;
I am using DBMS_XMLQUERY to eventually get this:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<INITCALL_TS>1/2/2002 12:45:0</INITCALL_TS>
<LASTCALL_TS>1/2/2002 12:45:0</LASTCALL_TS>
<CALL_SRC>CBIS </CALL_SRC>
<ELAPSED_TIME>10009</ELAPSED_TIME>
<REP_ID>MJB2302 </REP_ID>
<CALL_CNT>1</CALL_CNT>
</ROW>
</ROWSET>
Here's the real query... this OBJECT TYPE is embedded as an attribute of another OBJECT TYPE def.
          sQuery := 'SELECT '
               || iNumAcct || ' AS NUMACCT,
               SITE_T(S.ACCT,
                    S.SITE,
                    S.PHONE,
                    S.CUST_NM,
                    S.MED_IND,
                    S.MAC_IND,
                    S.HPP_IND,
                    S.STREET,
                    S.CITY,
                    S.STATE,
                    S.ZIP,
                    S.EUC,
                    S.STATUS,
                    S.AGR_TYP,
                    S.PRICE_SCHED,
                    S.OL_IND,
                    S.TRANS_IND,
                    S.CIRCUIT,
                    S.SUBSTATION,
                    S.OP_CENTER,
                    OUTAGE_STATUS_T(O.OUT_ID,
                         O.OUT_STATUS,
                         O.PO_DEV,
                         O.DEV_TYP,
                         O.CREW,
                         O.ETOR_TS,
                         O.TRBL_CD,
                         O.FIRST_RPT_TS,
                         O.END_TS,
                         O.CUST_CNT,
                         O.O_CALL_CNT,
                         OUTAGE_REPEAT_CALL_T(ORC.INITCALL_TS,
                              ORC.LASTCALL_TS,
                              ORC.CALL_SRC,
                              ORC.REP_ID,
                              ORC.CALL_CNT),
                         LIGHT_REPEAT_CALL_T(LRC.INITCALL_TS,
                              LRC.LASTCALL_TS,
                              LRC.CALL_SRC,
                              LRC.REP_ID,
                              LRC.CALL_CNT)
                         ) AS OUTCUST
               FROM
               OMS.SITE S,
               OMS.OUTAGE O,
               OMS.OUTAGE_REPEAT_CALL ORC,
               OMS.LIGHT_REPEAT_CALL LRC,
               OMS.OUTAGE_TRANSFORMER OT
               WHERE
               S.ACCT = ' || pi_acctNum || ' AND
               S.TRNFRMR_ID = OT.TRNFRMR_ID(+) AND
               OT.OUT_ID = O.OUT_ID(+) AND
               S.ACCT = ORC.ACCT(+) AND                         
               S.ACCT = LRC.ACCT(+)';
I know this may sound confusing...but I apprecitate anyone's/everyone's suggestions!
MJB
DUKEPOWER CO.

yes... here's the function that I also used as the expression...
FUNCTION uf_minutesDiff(pi_beginDte IN VARCHAR2, pi_endDte IN VARCHAR2) RETURN NUMBER
||     FUNC name: uf_minutesDiff
||     purpose: this function accepts A BEGINNING DATE AND ENDING DATE AND
||               RETURNS THE DIFFERENCE IN MINUTES
||
||     date:     12/19/2001
||     author: Mark J Brooks
||
||     history:
||
||
IS
     iMinutes     NUMBER;
/*      LINE 280          */
BEGIN
     select (to_date(pi_endDte,'DD-MON-YYYY:HH24:MI') -
          to_date(pi_beginDte,'DD-MON-YYYY:HH24:MI'))*24*60
          INTO iMinutes from dual;
     IF iMinutes = 0
     THEN
          iMinutes := 1;
     END IF;
     RETURN iMinutes;
END uf_minutesDiff;
I also just used:
SQL> SELECT OUTAGE_REPEAT_CALL_T2( ORPC.INITCALL_TS,
2 ORPC.LASTCALL_TS,
3 ORPC.CALL_SRC,
4 (ORPC.LASTCALL_TS - SYSDATE) AS ELAPSED_TIME,
5 ORPC.REP_ID,
6 ORPC.CALL_CNT)
7 FROM
8 OMS.OUTAGE_REPEAT_CALL ORPC
9 WHERE
10 ORPC.ACCT=123456;
(ORPC.LASTCALL_TS - SYSDATE) AS ELAPSED_TIME,
ERROR at line 4:
ORA-00907: missing right parenthesis
with and without the parens
tx

Similar Messages

  • Describe Object Type / Difference between desc & USER_TYPE_ATTRS ?

    Hi,
    1)Can someone show me how to use the sql+ 'desc' functionality in plsql? I need
    to descrive Object Types in a plsql procedure.
    2)What is the difference between using the 'describe' function - for describing an object type-and doing a select on USER_TYPE_ATTRS etc..?
    Sometimes desc gives an error while querying user_type_attrs works fine!
    db.version: 8.1.7.4
    best regards
    B.

    describe instruction is a SQL*Plus feature not PL/SQL
    Rgds.

  • How could we assign customized function module to the object

    Hi Experts,
    How could we assign z made function module to the object type.
    for instance, i have prepared one z function module and want to assign segment builder.
    Please help in this regard
    Thanks
    Mahesh Babu

    Hi Thiru,
    Standard Transaction Codes, have their own Function Modules for generating Outbound/Indbound Idocs. Where these Function Modules will be configured to a particular Process Codes.
    For E.g for PO's
    Process code : ME10 - IDOC_OUTPUT_ORDERS - for creation
    In case if its a Z Function Module, It depends on the case how you use IDOC types. either directly through Z Program or through Inbound/Outbound Process  codes with respective Function modules.
    Regards,
    Anbalagan

  • Populating text field with pl/sql expression or function

    Hi all,
    I have a function which return an object.
    create or replace type emp2_oty is object (server_name varchar2(20),
    status varchar2(4),
    refresh_on date,
    dw_refresh date)
    create or replace type emp2_nt is table of emp2_oty
    create or replace function testserver12 return emp2_nt
    is
    v_emp2_nt emp2_nt:=emp2_nt();
    a number;
    b number;
    c number;
    begin
    for r_emp in (select * from testing)
    loop
    a := extract(DAY FROM r_emp.dw_refresh);
    c := extract(DAY FROM r_emp.refresh_on);
    b := extract(DAY FROM SYSDATE);
    if (a != b) or (c != b) or (r_emp.status != 'on') then
    v_emp2_nt.extend; v_emp2_nt(v_emp2_nt.last):=emp2_oty(r_emp.server_name,r_emp.status,r_emp.refresh_on,r_emp.dw_refresh);
    end if;
    end loop;
    return v_emp2_nt;
    end testserver12;
    The pl/sql code to get the return value displayed. It works very fine in sqlworkshop.
    declare
    v_temp_nt emp2_nt;
    i number := 1;
    begin
    v_temp_nt:= testserver12();
    for i in (v_temp_nt.first)..(v_temp_nt.last) loop
    dbms_output.put_line(v_temp_nt(i).server_name||' '||v_temp_nt(i).status||' '||v_temp_nt(i).refresh_on ||' '||v_temp_nt(i).dw_refresh);
    end loop;
    end;
    I want it to get display the output into the text field.
    Please could any one help me to achieve this.
    Thanks in advance
    bye
    Srikavi

    Pretty easy, add a CHR(10) (ASCII for carriage return) in the string concatenation.
    e.g.
       l_result:= l_result || (v_temp_nt(i).server_name || ' ' ||
                     v_temp_nt(i).status || ' ' ||
                     v_temp_nt(i).refresh_on ||' ' ||
                     v_temp_nt(i).dw_refresh) || CHR(10);Also why over complicate the whole process by using objects and types by simplifying the code and also improving readability and maintenance by replacing the PL/SQL function body with something similar to (the conditions have been negated and may have not been what you meant in the first place)
    DECLARE
       v_text_return VARCHAR2(2000);
       l_cur CURSOR IS
          SELECT t.server_name,
                 t.status,
                 t.refresh_on,
                 t.dw_refresh
          FROM   testing t
          WHERE  To_Char(t.refresh_on, 'DD') = To_Char(SYSDATE, 'DD')
          AND    To_Char(t.dw_refresh, 'DD') = To_Char(SYSDATE, 'DD')
          AND    Upper(t.status) = 'ON');
    BEGIN
       FOR r_emp in l_cur
       LOOP
          v_text_return := v_text_return || r_emp.server_name || ' ' ||
                             r_emp.status || ' ' ||
                             r_emp.refresh_on || ' ' ||
                             r_emp.dw_refresh || CHR(10);
       END LOOP;
       RETURN v_text_return;
    END;Hope this helps

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

  • Object type mappings in expression builder

    Hi,
    I'm trying to use expression builder to give me a query returning all instances of an object with a particular foreign key, and where 'active' = true.
    'active' is a CHAR field in the database with values 'T' or 'F' and this is mapped to a Boolean in workbench as true and false.
    All works fine in normal operations, retrieving and writing the data.
    I've written the expression as
    myId EQUAL arg
    AND
    active EQUAL 'true'
    where 'true' is a literal of type Boolean.
    Unfortunately, running this query generates an error that no mapping exists for 'true'.
    I've also tried changing it to
    active EQUAL 'T'
    where 'T' is a literal of type String.
    This also generates an error.
    It seems to me as though the object type mapping is confusing the expression builder and it can't generate the sql correctly.
    Any ideas?

    Can you post the specific version of TopLink, the exact code you are using to construct and execute your query, as well as the error message with stack trace. With these items we should be able to provide an answer for you.
    Doug

  • Type conflict when calling a function module (field length)

    Dear All,
                I am getting this following error while executing:  Type conflict when calling a function module (field length)
    This is piece of coding i have writern in my action button.
    method SEARCH_MATERIAL .
      data:
            node_mat_input TYPE REF TO  if_wd_context_node,
            node_mat_output TYPE REF TO if_wd_context_node,
            material TYPE BAPIMATDET-MATERIAL,
            itab TYPE TABLE OF BAPIMATDOA.
      node_mat_input = wd_context->get_child_node( 'NODE_MAT_INPUT' ).
      node_mat_output = wd_context->get_child_node( 'NODE_MAT_OUTPUT' ).
      node_mat_input->get_attribute( EXPORTING name = 'MATERIAL'
                                     IMPORTING value = material ).
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material                    = material
        PLANT                       = plant
        VALUATIONAREA               =
        VALUATIONTYPE               =
        MATERIAL_EVG                =
       IMPORTING
         MATERIAL_GENERAL_DATA       = itab
        RETURN                      =
        MATERIALPLANTDATA           =
        MATERIALVALUATIONDATA       =
      node_mat_output->bind_table( itab ).
    endmethod.
    Attributes are:
    Node name = INPUT its structure is BAPIMATDET
    INPUT attributes = MATERIAL of type BAPIMATDET-MATERIAL
    Thanks,
    Gopi.

    Hi Amit,
               I have used service call to fetch records from that bapi..
    The following is the code generated by service call:-
    METHOD execute_bapi_material_get_deta .
    declarations for context navigation
      DATA:
        node_bapi_material_get_de   TYPE REF TO if_wd_context_node,
         node_exporting   TYPE REF TO if_wd_context_node,
         node_material_general_dat   TYPE REF TO if_wd_context_node,
         node_importing   TYPE REF TO if_wd_context_node,
          lri_element    TYPE REF TO if_wd_context_element.
    declarations for fuba parameters
      data:
        stru_c_material_general_dat    TYPE if_componentcontroller=>element_material_general_dat.
      DATA:
        attr_material    TYPE bapimatdet-material,
        attr_plant    TYPE bapimatall-plant.
    get all involved child nodes
      node_bapi_material_get_de = wd_context->get_child_node( `BAPI_MATERIAL_GET_DE` ).
      node_exporting = node_bapi_material_get_de->get_child_node( `EXPORTING` ).
      node_material_general_dat = node_exporting->get_child_node( `MATERIAL_GENERAL_DAT` ).
      node_importing = node_bapi_material_get_de->get_child_node( `IMPORTING` ).
    get input from context
      node_importing->get_attribute(    EXPORTING      name = `MATERIAL`
                                                         IMPORTING      value = attr_material ).
      node_importing->get_attribute(  EXPORTING       name = `PLANT`
                                                              IMPORTING       value = attr_plant ).
    the invocation - errors are always fatal !!!
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material =                        attr_material
          plant =                           attr_plant
    "      valuationarea =                   wd_This->Valuationarea
    "      valuationtype =                   wd_This->Valuationtype
    "      material_Evg =                    wd_This->Material_Evg
        IMPORTING
          material_general_data =           stru_c_material_general_dat
    "      return =                          wd_This->Return
    "      materialplantdata =               wd_This->Materialplantdata
    "      materialvaluationdata =           wd_This->Materialvaluationdat
      node_material_general_dat->bind_structure( stru_c_material_general_dat[] ).
    ENDMETHOD.
                                 but the problem is I  am getting the following error while compiling...
    " stru_c_materialplantdata " is not an internal table - the " OCCOURS n"  specification is missing.
    Thanks,
    Gopi.
    Edited by: Yegalaivan on Nov 18, 2009 8:30 AM

  • How To Declare an Exception As a Field Inside an Object Type

    Hi All;
    How can i declare(define as a property) an exception in a object type?
    Best Regards...
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> CREATE TYPE ex_t AS OBJECT
      2  (
      3    i NUMBER,
      4    e EXCEPTION,
      5    MEMBER FUNCTION get_i RETURN number
      6  )
      7  ;
      8  /
    Warning: Type created with compilation errors
    SQL> show err
    Errors for TYPE HR.EX_T:
    LINE/COL ERROR
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:      
    <an identifier> <a double-quoted delimited-identifier> LONG_     double ref char time timestamp interval date binary national
    character nchar  The symbol "<an identifier> was inserted before "EXCEPTION" to continue. 
    SQL>

    > 2- You could create a different class just to handle exceptions and call it from this one (again you would build a varchar2 attribute to pass the message).
    Like this one perhaps. (I've not looked at it in a couple of years though.)
    EXCEPTION is not a SQL datatype. Valid datatypes are listed here.

  • Invalid stored Object Types with Constructor Function

    hi folks,
    i created a stored object type on database 10.2. but it is invalid.
    it has a constructor function and a number of member functions.
    SQLPlus the only feddback is
    Warning: Type Body is compiled with errors.
    Toad 9.0.0 gives no error message.
    how can i find out what kind of error there is? and where?
    thx for help
    joerg

    In SQL*Plus, when you get a warning that you've created an object with compilation errors, you can type
    SQL> show errorsto see the list of errors.
    Justin

  • Oracle Object Types vs. Table Fields

    Hello, all.
    I`m totally new to Oracle, and I am facing a very hard problem for me, and I would like to ask your help.
    I've been working on a project which uses Oracle Object Types, from a database of a legacy system.
    I did not know Oracle Objects until 5 minutes ago, so sorry If I say something stupid:
    Per my understanding, a Oracle Object Type can be formed by fields like myField varchar(200)... and fields from an existing table or view.
    I have a lot of objects on my system and I need to map each field and its respective table or view that compose each object.
    Does anyone have a query for that? I think it should be common, but I could not find anything at google (maybe I don`t which terms use to find...)
    I would be very thankful if somebody could help (save) me.
    Thanks in advance.
    Paulo

    First, it would help if you post what you object types look like.
    I'm assuming they may look something like this:
    SQL> create TYPE emp_type AS OBJECT
      2    (emp_id   NUMBER,
      3     name VARCHAR2(20));
      4  /
    Type created.
    SQL> create TYPE emp_tab IS TABLE OF emp_type;
      2  /
    Type created.
    SQL> create or replace package emp_test as
      2  procedure get_emps;
      3  end emp_test ;
      4  /
    Package created.
    SQL> create or replace package body emp_test as
      2    employees emp_tab := emp_tab();
      3    procedure get_emps as
      4      g_rc sys_refcursor;
      5  BEGIN
      6    employees.EXTEND(2);
      7    employees(1) := emp_type (1, 'John Smith');
      8    employees(2) := emp_type (2, 'William Jones');
      9    OPEN g_rc FOR
    10    SELECT * FROM TABLE (CAST (employees AS emp_tab));
    11  END get_emps ;
    12  end emp_test ;
    13  /
    Package body created.

  • Member function and member procedure inside an object type in Oracle.

    Hi All,
    Please do have a look at these codes and help me understand. I have no idea about this member function and member procedure. How do they work? Please explain me about this.
    Regards,
    BS2012
    create type foo_type as object (
      foo number,
      member procedure proc(p in number),
      member function  func(p in number) return number
    create type body foo_type as
      member procedure proc(p in number) is begin
        foo := p*2;
      end proc;
      member function func(p in number) return number is begin
        return foo/p;
      end func;
    end;
    /

    Methods are just like functions or procedures in a package, except they're not in a package, their part of an object type.
    The object has attributes (which are the variables declared in it).
    To use such an object you would do things like this...
    SQL> set serverout on
    SQL>
    SQL> declare
      2    v_foo foo_type;
      3    v_val number;
      4  begin
      5    v_foo := foo_type(20); -- instantiate the object and initialize the object attributes
      6    v_foo.proc(20); -- call the object method (proc)
      7    v_val := v_foo.func(4); -- call the object method (func)
      8    dbms_output.put_line(v_val);
      9  end;
    10  /
    10
    PL/SQL procedure successfully completed.The Type definition you've declared creates the object class, but not actually an object itself.
    To actually have an object you need to declare a variable of that object class type, and then instantiate it. When you instantiate the object you need to initialize all the attributes (generally you can pass null if required for each of them to initialize them).
    Once you have your object instantiated, you can call the methods within that object as demonstrated above, a bit like calling functions and procedures in a package, except they are methods within the object type itself, and therefore called directly by referencing them from the variable.
    The documentation goes into a lot more detail of objects if you look it up.

  • Can Evaluate function return object type

    Hi
    Evaluate function can be used to call db functions in OBIEE. I have a function which returns an object ( pl/sql table).
    Created a simple report in Oracle Answers and added following in one of the columns
    evaluate( 'get_ccid(%1)' as t_ccid , @{p_request})
    When I try to run this in Oracle answers, getting syntax error. If same function returns varchar or number it works well.

    evaluate( 'get_ccid(%1)' as t_ccid , @{p_request})Eakta, You syntax seems to be wrong here. What type of data your presentation variable contains here ?? You are saying its working fine with Number datatype..so can you try..somthing like below with some default value..
    EVALUATE('get_ccid(%1)',@{p_request}{2})
    OR
    EVALUATE('get_ccid(%1)' as varchar(250),@{p_request}{ABC})
    Also, refer
    Syntax for Evaluate function in OBIEE
    http://108obiee.blogspot.com/2009/04/using-presentation-variable-from-first.html
    Hope its useful

  • Cannot call member function on object type

    On 8.1.6 I cannot call a member function from SQL in the way described in the manual.
    The following example is almost copied from the manual:
    create or replace TYPE foo AS OBJECT (a1 NUMBER,
    MEMBER FUNCTION getbar RETURN NUMBER);
    create or replace type body foo is
    MEMBER FUNCTION getbar RETURN NUMBER is
    begin
    return 45;
    end;
    end;
    CREATE TABLE footab(col foo);
    SELECT col,foo.getbar(col) FROM footab; -- OK
    select col,col.getbar() from footab; -- ERROR
    The second select is the way it should be, but I get an error "invalid column name".
    Using the first select, I get the result. This is strange because this is more or less the 'static member' notation (filling in the implicit self parameter myself).
    Is this a known bug in 8.1.6, maybe fixed in later versions?

    Konstantin,
    Did you use loadjava to load the compiled class into the Oracle Database?
    Regards,
    Geoff
    Hello!
    I need to write a member function for object type with java.
    for example:
    create type test as object(
    id number,
    name varchar2(20),
    member function hallo return number);
    create type body test as
    member function hallo return number
    as language java
    name 'test.hallo() return int;
    create table test of test;
    My java-file is:
    public class test {
    public int hallo() {
    return 5;
    select t.hallo() from test t;
    It's does not run. Why?
    I get always an error back. Wrong types or numbers of parameters!!
    please help me.
    thanks in advance
    Konstantin

  • Enable Functional Area field in PA30 Info type 0001 Screen

    Hi,
    I need to enable Functional Area (PA0001-FKBER) field in info type 0001 screen of PA30 and the functional area should pick up value corresponding to cost centre.
    I unhide the field in T588M table, but still i dont see the field in PA30 Info type 0001 Screen,
    Can someone please let me know what other settings need to be activated for enabling functional area in 0001 screen.
    Awaiting quick response.
    Thanks.
    Sudha

    Dear Shuda,
    Please check the attached note 763962,798840,701933,755796 and 822157
    Also,
    If Funds Management and Controlling are updated in an integrated way such that the cost center is always the leading account assignment and the fund center is derived, the HR must not (and does not) support the maintenance of derived information (such as fund center). Thus there are the following three possible scenarios:
    - Funds Management (FM) is not active.   -> HR doesn't show Fund Center
    - FM is active but without CO-Integration-> HR shows Fund Center
    - FM is active with CO Integration       -> HR doesn't show Fund Center
    These scenarios can be maintained with time dependence (active from-dates): There can be a period for the first, a second time interval for the second and a third time interval for the last scenario.
    Hope this help
    Sarah

  • ORA-30626: function/procedure parameters of remote object types not support

    Hello,
    I am trying to create a dynamic LOV.
    I have a table and package in a remote database, I am connecting to the database using dblink. When I access package I am getting error
    ORA-30626: function/procedure parameters of remote object types are not supported
    However I can access table with [email protected], not the package!
    How can I solve this problem?

    Did you ever get an answer/workaround to this? I'm having similar problems in 10g.

Maybe you are looking for

  • How to delete the Monitor Previous Items list ?

    Hello, I have in my monitor menu, the one in the menu bar, 2 lines : 1920x1080 60 Hz Millions Call them Last and Last-1 When I use Last-1 all my display becomes a bit blurred, specially the fonts in all apps. But it is LAST which has the check mark..

  • Contacts app not finding names in Exchange 2010

    Contacts app not finding names in Exchange 2010 server This is weird, could be a bug in 10.8.2, not sure, want to see if anyone else is seeing this. Mountain Lion 10.8.2 Exchnage account created for: Mail, Contacts, Calendars. All looks good there. C

  • Iphoto crashes when it try to find faces.

    Hello, I'm having a big problem with iphoto (well my cousin is), on her macbook, iphoto was working fine at first when I install ilife '09, then after I added some photos from a disk on 6 photos, after that when it tries to find faces iphoto crashes.

  • Notes App back-up steps? (3GS OS 3.1.1)

    How Can I back-up my Yellow-page notes (iPhone Native App Original)? I could not easily find it on iTune Help. Using iPhone 3GS with OS 3.1.3

  • ANN: LensFix CI now works as an external editor

    Just wanted everyone to know that LensFix CI (an OS X application) now works as an external editor in Lightroom. LensFix CI corrects distortion and allows perspective changes using Apple's Core Image tools so it is very fast. LensFix CI uses Thomas N