incompatible data types: expected - got CHAR, variable connection see detail

Hello.
Here's my problem:
I have connected with a link master detail views. Variable binding that contain both have some session information views:
It is a menu on the database and I'm trying to hide certain values based on the permissions of the user.
When you run the application module, everything works fine. The problem occurs when I try to display the menu as a picture of the tree, or any other table, on a page.
The root view runs correctly, but then I get a
"java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent data types: expected - got TANK.
error in the method executeQueryForCollection of the detail view. (this method is overridden)

Bind Variables are:
-: menuRoot-> that contains the value of the root node. (In the Details view, it is just a dummy variable. It is explained later why I used it.)
-: listOfUserPermmission-> permissions of the user table.

My query looks like this:

1 Master View:
SELECT MetVMenu.CHILD_ID, 
       MetVMenu.CHILD_IME_MODULA, 
       MetVMenu.PARENT_ID, 
       MetVMenu.PARENT_IME_MODULA, 
       MetVMenu.ZST, 
       MetVMenu.NIVO, 
       MetVMenu.CHILD_NAZIV_V_MENIJU, 
       MetVMenu.CHILD_TIP_MODULA, 
       MetVMenu.CHILD_OPIS_MODULA
FROM MET_V_MENU MetVMenu
WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot
and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
CHILD_IME_MODULA and PARENT_IME_MODULA are also names of permissions.

2. see link that connects the master. CHILD_ID and detail PARENT_ID

3 detail view, then linking to itself... to get the tree menu.
SELECT MetVMenu.CHILD_ID, 
       MetVMenu.CHILD_IME_MODULA, 
       MetVMenu.PARENT_ID, 
       MetVMenu.PARENT_IME_MODULA, 
       MetVMenu.ZST, 
       MetVMenu.NIVO, 
       MetVMenu.CHILD_NAZIV_V_MENIJU, 
       MetVMenu.CHILD_TIP_MODULA, 
       MetVMenu.CHILD_OPIS_MODULA
FROM MET_V_MENU MetVMenu
WHERE :menuRoot like 'a'
and
MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
4 ViewLink, which connects CHILD_ID and PARENT_ID from this point of view 'detail '.

Two views executeQuery methods are overridden to define Bind variables before execution.
I get an arrayList of strings (permissions) of session and then convert it to a table.

ArrayList permmissionsArray = (ArrayList)MyUserSession.getSessionValue("permissions");
     Array permissions = new Array(permissionsArray.toArray());
        HashMap context = new HashMap();
        context.put(DomainContext.ELEMENT_SQL_NAME, "STRARRAY");
        context.put(DomainContext.ELEMENT_TYPE, String.class);
        
        if(permissions != null){
            permissions.setContext(null, null, context);
            setlistOfUserPermission(permissions);
        }
     //Here I set menuRoot variable.
     
I also noticed that there are problems with how define bind variables (issues).
So when I did use the variable menuRoot in Details view I had the
' incompatible data types: expected - got TANK.
error in the module of the application.

prepareRowSetForQuery() has solved the problem for me. The binding variable is null and that was the reason for the error incompatible data type.
Regarding the error of the tree-> it was a mistake in the definition of the cardinality.

Tags: Java

Similar Questions

  • ADF: ORA-00932: inconsistent data types: expected - got TANK

    I get this error while casting. ORA-00932: inconsistent data types: expected - got TANK
    I had departments such as front number... .but must be able to take over the alpha characters... so I changed my Bind Variables in my model: Array string (decimal Big)

    This is the error:

    where dept in (SELECT * FROM TABLE (CAST (: depts AS glc.))) NUMTABTYPE)))

    How can I solve this?... probably need to delete interpreters from here... .but how I it... any help is appreciated.

    I also Type:
    create or replace TYPE NUMTABTYPE in the TABLE to the number; (also I tried to change this option for create or replace TYPE NUMTABTYPE in the TABLE to the varchar2 (200);)

    I changed the table to a string and

    [oracle.jbo.domain.Number]"with java.lang.String to support also supports departments alpha characters... dept can be AB123 (string) or 3344 (number only)

    The entire query
    ============
    SELECT * FROM (SELECT
    NVL ("DEPT", "Grand Total") as DEPT,
    PERIOD_YEAR,
    In summary (round ("Jan real CDA")) 'real Jan CDA. "
    In summary (round ("Feb real CDA")) 'Feb CDA real. "
    In summary (round ("Mar real CDA")) 'Mar CDA real. "
    In summary (round ("Apr CDA")) real 'Real CDA Apr',
    In summary (round ("peut CDA")) real "can actual CDA."
    In summary (round ("Jun real CDA")) 'Jun CDA real. "
    sum (round ("Jul real CDA")) 'Real CDA Jul',
    In summary (round ('Aug real CDA")) 'Aug CDA real."
    In summary (round ("Ms real CDA")) 'Ms CDA real. "
    In summary (round ("Oct real CDA")) 'Oct CDA real. "
    In summary (round ("Nov real CDA")) 'real CDA Nov. "
    In summary (round ('Dec real CDA")) 'Dec CDA real."
    In summary (round ("Jan CDA Budget")) 'Budget of CDA Jan. "
    In summary (round ("Feb CDA Budget")) 'Feb CDA Budget. "
    In summary (round ("Mar CDA Budget")) 'Mar CDA Budget. "
    In summary (round ("Apr CDA Budget")) 'Apr CDA Budget. "
    In summary (round ("can CDA Budget")) 'Budget of CDA can. "
    In summary (round ("Jun CDA Budget")) 'Jun CDA Budget. "
    In summary (round ("Jul CDA Budget")) 'Jul CDA Budget. "
    In summary (round ("Aug CDA Budget")) 'Aug CDA Budget. "
    In summary (round ("Sep CDA Budget")) 'Ms CDA Budget. "
    In summary (round ("Oct CDA Budget")) 'Oct CDA Budget. "
    In summary (round ("Nov CDA Budget")) 'Nov CDA Budget. "
    In summary (round ("CDA Budget Dec")) 'Dec CDA Budget. "
    In summary (round ('Total Budget uncorrected')) "Annual_Budget."
    In summary (round ("Total Budget")) "Revised_BUDGET."
    sum (round ("real CDA")) "YTD_ACTUALS."
    In summary (round ("Jan Actual")) "Jan_ACTUAL."
    In summary (round ('Jan Budget')) "Jan_BUDGET."
    In summary (round ("Jan Actual")) "JanYTDACTUAL."
    In summary (round ('Jan Budget')) "JanYTDBUDGET."
    sum (round ("real Feb")) "Feb_ACTUAL."
    In summary (round ('Feb Budget')) "Feb_BUDGET."
    sum (round ("real Mar")) "Mar_ACTUAL."
    In summary (round ("Budget de Mar")) "Mar_BUDGET."
    sum (round ("real Apr")) "Apr_ACTUAL."
    In summary (round ("Apr Budget")) "Apr_BUDGET."
    In summary (round ("can real")) "May_ACTUAL."
    In summary (round ("Budget can")) "May_BUDGET."
    sum (round ("real Jun")) "Jun_ACTUAL."
    In summary (round ('Jun Budget')) "Jun_BUDGET."
    sum (round ("real Jul")) "Jul_ACTUAL."
    In summary (round ('Jul Budget')) "Jul_BUDGET."
    sum (round ("real Aug")) "Aug_ACTUAL."
    In summary (round ('Aug Budget')) "Aug_BUDGET."
    sum (round ("real Sep")) "Sep_ACTUAL."
    In summary (round ('Ms Budget')) "Sep_BUDGET."
    sum (round ("real Oct")) "Oct_ACTUAL."
    In summary (round ('Oct Budget')) "Oct_BUDGET."
    sum (round ("real Nov")) "Nov_ACTUAL."
    In summary (round ('Nov Budget')) "Nov_BUDGET."
    sum (round ("real Dec")) "Dec_ACTUAL."
    In summary (round ("Dec Budget")) "Dec_BUDGET."
    sum (round ("Jan Budget" + "Jan Budget Adj")) "Jan_Budget_Orig."
    sum (round ("Budget Feb" + "Feb Budget Adj")) "Feb_Budget_Orig."
    sum (round ("Mar Budget" + "Mar Budget Adj")) "Mar_Budget_Orig."
    sum (round ("Apr Budget" + "After Budget Adj")) "Apr_Budget_Orig."
    sum (round ("Budget can" + "Can Budget Adj")) "May_Budget_Orig."
    sum (round ("Jun Budget" + "Jun Budget Adj")) "Jun_Budget_Orig."
    sum (round ("Jul Budget" + "Jul Budget Adj")) "Jul_Budget_Orig."
    sum (round ("Aug Budget" + "August Budget Adj")) "Aug_Budget_Orig."
    sum (round ("Ms Budget" + "Ms Budget Adj")) "Sep_Budget_Orig."
    sum (round ("Oct Budget" + "Oct Budget Adj")) "Oct_Budget_Orig."
    sum (round ("Budget Nov" + "Nov Budget Adj")) "Nov_Budget_Orig."
    sum (round ('Dec Budget '' + '' Dec Budget Adj")) 'Dec_Budget_Orig '.
    GLC. GLC_BUDANAL_ACT_BUD_ADJ_VAR_V mainanal
    where dept in (SELECT * FROM TABLE (CAST (: depts AS glc.))) NUMTABTYPE))) and period_year =: year and substr ("OBJECT", 1, 3). =: excludeObject
    and mainanal. FERC not like 4% '
    Group by the Department, period_year) QRSLT ORDER BY DEPT

    As you say your table does not number but the strings. If you must change the table in an array of strings.

    Timo

  • ORA-00932: inconsistent data types: expected - got CURSER

    Hi all

    I created a function and tried to run SQL Plus, but I get an error

    ORA-00932: inconsistent data types: expected - got CURSER

    I tried to debug for centuries, but are unable to the root of what could be the problem. I'd appreciate any help or idea people could offer

    The only consolation I take from this is that Oracle have typo in one of their error messages :)



    SQL MORE CODE
    select * FROM TABLE(CAST(tsoraimpdb.QueryAuthorsFunc(116, 1, -1, 1, 0) as tsoraimpdb.ENTITYIDTABLE));
    THE FUNCTION CODE
    CREATE OR REPLACE FUNCTION &HKImpDB_Schema_Name..QueryAuthorsFunc 
    (
    aKGID NUMBER,
      aPageNumber NUMBER,              -- The page interested
      aPageSize NUMBER,                -- Number of records per page
      aOffset NUMBER,                  -- The offset = number of records already got
      aTotalRecord NUMBER          -- Total number of users in the database
    )
    RETURN sys_refcursor
    as
    l_FuncCur sys_refcursor;
    l_TotalRecord NUMBER(10) := aTotalRecord;
    l_Offset NUMBER(10) := aOffset;
    l_PagingTable TEMP_T_TABLE:= TEMP_T_TABLE();
    
    -- paging set up
    l_MinRecordsOnAPge NUMBER(10); --last record on the previous page
    l_MaxRecordsOnAPge NUMBER(10); --last record on the current page
    begin
    DBMS_OUTPUT.PUT_LINE('start');
    select KnowdePos(rownum,p.ID) bulk collect into l_PagingTable
      FROM KnowledgeGene kg
      INNER JOIN HKResource r ON kg.KGOwner = r.ID
      INNER JOIN Person p ON r.PersonID = p.ID
    WHERE kg.kgid = akgid
    ORDER BY p.FirstName + ' ' + p.LastName;
    
    l_TotalRecord := l_PagingTable.count; -- get total records
    DBMS_OUTPUT.PUT_LINE(  l_TotalRecord);
    
    if aPageSize > 0 then
      if aPageNumber <= 0 then
              Raise_application_error(-20003,'Invalid Page Number');
      else
          l_MinRecordsOnAPge := (aPageNumber-1)*aPageSize;
          l_MaxRecordsOnAPge := aPageNumber*aPageSize;
      end if;
    else -- if @PageSize < 0 return all records
        l_Offset := 0;
        l_MinRecordsOnAPge := 0;
        l_MaxRecordsOnAPge := l_TotalRecord;
    END if;
    
    -- return results for the correct page
    open l_FuncCur for
    SELECT pos
      from HKResource r
      INNER JOIN Person p ON r.PersonID = p.ID
      inner join TABLE(CAST(l_PagingTable AS TEMP_T_TABLE)) on pos = p.id
      WHERE KnowdeID > l_MinRecordsOnAPge - l_Offset AND KnowdeID <= l_MaxRecordsOnAPge - l_Offset;
    
    return l_FuncCur;
    EXCEPTION when NO_DATA_FOUND then null;
    end;

    You cannot get the ref cursor in a table like this. Either use a PL/SQL program to extract the lines of ref cursor and display them via dbms_output.put_line (or something) or load the results into a collection and then cast the collection in a table in your select statement.

  • incompatible data types: expected NUMBER got LONG

    Version 3.2.20.09

    Hello

    I use SQL Developer and want to see trigger body using as a function but unfortunately its data type is long so that I get the error message, is there a way by which I can see the bodies of trigger...

    Example query

    TRIGGER_BODY

    SELECT TRIGGER_BODY FROM user_triggers

    WHERE TRIGGER_BODY LIKE '% HEAR. "

    Error

    ORA-00932: inconsistent data types: expected NUMBER got LONG

    00932 00000 - ' incompatible data types: wait %s %s got. "

    * Cause:

    * Action:

    Error on line: column 2: 7

    This isn't a matter of SQL Developer.  Access quick, but partial, the answer is that the display of a LONG column in SQL * more / developer SQL can be done by issuing just one

    1000 long - value (or some other, more)

    You are referencing a LONG in a WHERE clause, however, is absolutely forbidden as I know.  Maybe something new (System invisible columns generated in LONG columns in the data mirrored dictionary?) are available in 12 c, but disapproval of LONG was announced in Oracle 8 in favour of the LOBs.

    Anyway, if you do not want to ask this question in the forum of PL/SQL, see solution code of Laurent Schneider in this old debate...

    Search long data type in the column

  • ORA-00932: inconsistent data types: expected - got NUMBER

    Hello
    in 10g R2:
    SQL> select count(*) from sysman.MGMT_METRICS_RAW;
    select count(*) from sysman.MGMT_METRICS_RAW
                                *
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 3, block # 27080)
    ORA-01110: data file 3: 'D:\BASE\DB\DATA\SYSAUX01.DBF'
    SQL> select * from sysman.MGMT_METRICS_RAW where rowid=27080;
    select * from sysman.MGMT_METRICS_RAW where rowid=27080
                                                     *
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got NUMBER
    How to convert the rowid to be accepted in this query?
    Thank you

    This isn't the rowid. This is the block #.

  • -Error ORA-00932: inconsistent data types: expected TANK got the NUMBER

    Here is my report query...
    select 
    *
    from   DW_RFA_JOBDATA
    where  FINISH_TIME >= :P1_START_DATE 
    and FINISH_TIME < :P1_END_DATE
         AND RFA_FLAG = (CASE :P1_JOB_CLASSIFICATION WHEN '0' THEN 'LSF'
                                      WHEN '1' THEN 'NON-LSF' 
                                      ELSE RFA_FLAG END)
    The column data type RFA_FLAG is NUMBER(*,0)... I'm view RSA and RSA - not the area of selection, but I get the error ORA-00932: inconsistent data types: expected TANK got the NUMBER >

    I have created a static LOV with LST display 0 return
    Display NON - RSA 1 return...

    Could any body please help me in truble shooting error? How to to convert the data type to number, I have no privileges to make changes to the table...

    Mark you my previous answer as correct? (MOST POINTS!  :))

  • -Error function of incompatible data types

    Hi all

    I created a function that will take 3 IN parameters and return the result in type. Here's the code.

    Created a table type:

    {code}

    CREATE OR REPLACE TYPE FEATURES_ROW_TYPE

    AS AN OBJECT

    (VARCHAR2 (100) OF THE ENVIRONMENT)

    MNR VARCHAR2 (100),

    GUID VARCHAR2 (100),

    USER_ID VARCHAR2 (1000).

    RGN VARCHAR2 (100),

    RGN_NM VARCHAR2 (5000).

    FEATURE_NAME VARCHAR2 (5000).

    DATE OF LAST_SIGON_DATE

    );

    CREATE OR REPLACE TYPE FEATURES_TABLE_TYPE

    AS THE FEATURES_ROW_TYPE TABLE;

    {code}

    Here's the function:

    {code}

    CREATE OR REPLACE FUNCTION FETCH_FEATURES_FN (P_ENVIRONMENT IN VARCHAR2,

    P_FEATURE_ID NUMBER,

    P_RGN IN VARCHAR2

    )

    RETURN FEATURES_TABLE_TYPE

    IS

    V_ROWS FEATURES_TABLE_TYPE: = FEATURES_TABLE_TYPE ();

    V_CUR_ENV VARCHAR2 (100);

    V_ENV VARCHAR2 (50);

    V_WHERE VARCHAR2 (1000);

    V_SQL VARCHAR2 (10000);

    BEGIN

    V_ENV: = '@DBL_ ' | P_ENVIRONMENT;

    V_CUR_ENV: = P_ENVIRONMENT;

    IF P_RGN = "ALL" THEN

    V_WHERE: = ' WHERE FD. WPP_FTR_IK = ' | P_FEATURE_ID;

    ON THE OTHER

    V_WHERE: = ' WHERE FD. WPP_FTR_IK = ' | P_FEATURE_ID | "AND FD. RGN = ' | '''' || P_RGN | '''';

    END IF;

    V_SQL: =.

    "WITH USER_DATA ' | ' ' ||

    "ACE" | ' ' ||

    ' (SELECT DISTINCT EB. GUID, AD. USER_ID_ACCT_AFFECTED AS USER_ID, MAX (TRANSACTION_TS) AS LAST_SIGNON_DATE ' | ' ' ||

    "TO WPP_EBIZ_ACCT" | V_ENV | '  EB'                                                                || ' ' ||

    "INNER JOIN WPP_SECURITY_AUDIT_LOG | V_ENV | ' AD'                                                   || ' ' ||

    ' ON EB. GUID = AD. USER_UNIQUE_ID_ACCT_AFFECTED ' | ' ' ||

    ' WHERE AD. APP_NAME = "consumer" AND AD. TRANSACTION_TYPE_CD = "SIGN_ON" AND AD. FEATURE_NAME = "sign" AND AD. TRANSACTION_RESULT_CD = "S" ' | ' ' ||

    ' GROUP BY EB. GUID, AD. USER_ID_ACCT_AFFECTED ' | ' ' ||

    '), ' || ' ' ||

    "FEATURE_DATA" | ' ' ||

    'AS '           || ' ' ||

    "(MY SEPARATE SELECT." MNR, EB. GUID, MY. RGN, RGN. RGN_NM, FTR. WPP_FTR_IK, FTR. NM AS FEATURES_SUPPORTED ' | ' ' ||

    "TO WPP_MBRSHP_ACCT" | V_ENV | "MY" | ' ' ||

    "INNER JOIN WPP_EBIZ_ACCT | V_ENV | ' EB WE MY. WPP_EBIZ_ACCT_IK = EB. WPP_EBIZ_ACCT_IK' | ' ' ||

    "INNER JOIN WPP_RGN | V_ENV | «RGN WE MY.» RGN = RGN. RGN_ID ' | ' ' ||

    "INNER JOIN WPP_RGN_APLCTN_STS | V_ENV | ' RGN_ST ON RGN_ST. RGN_ID = RGN. RGN_ID ' | ' ' ||

    "INNER JOIN WPP_FTR_APLCTN | V_ENV | ' FTR_APP ON FTR_APP. WPP_FTR_APLCTN_IK = FTR_APP. WPP_FTR_APLCTN_IK ' | ' '||

    "INNER JOIN WPP_FTR | V_ENV | "FTR ON FTR. WPP_FTR_IK = RDFS. WPP_FTR_IK' | ' ' ||

    ') ' || ' ' ||

    "SELECT DISTINCT"HINT1"LIKE ENVIRONMENT, | ' ' ||

    "FD. MNR, FD. GUID, UD. USER_ID, FD. RGN, FD. RGN_NM, FD. FEATURES_SUPPORTED ACE FEATURE_NAME, TO_DATE (TRUNC (UD. LAST_SIGNON_DATE)) AS LAST_SIGNON_DATE' | ' ' ||

    "FROM FEATURE_DATA INNER JOIN USER_DATA UD ON FD FD. GUID = UD. GUID ' | ' ' || V_WHERE;

    -DBMS_OUTPUT. PUT_LINE (V_SQL);

    RUN IMMEDIATELY V_SQL

    BULK COLLECT INTO V_ROWS;

    RETURN V_ROWS;

    END FETCH_FEATURES_FN;

    {code}

    When I tried to run as below.

    SELECT * FROM TABLE (FETCH_FEATURES_FN ('HINT1', 2, 'ALL'));

    but I get the error message

    ORA-00932: inconsistent data types: expected - was -.

    ORA-06512: at "KPGCPY. FETCH_FEATURES_FN', line 57

    00932 00000 - ' incompatible data types: wait %s %s got. "

    * Cause:

    * Action:

    Please guide to solve this problem.

    Thank you

    So after running actual query:

    -DBMS_OUTPUT. PUT_LINE (V_SQL);

    You said the line that will do.

    Firstly - I suggest replace this long, complex query with a VERY SIMPLE one until your code actually works.

    When you do this, you will see that the TYPE that you defined (FEATURES_ROW_TYPE) is NOT mentioned anywhere in your code.

    You need create instances of this TYPE, then a collection of these instances.

    Some EXAMPLES of code that shows what I mean by VERY SIMPLE and shows how interrogate instances of a TYPE in a collection

    -type to match record emp

    create or replace type emp_scalar_type as an object

    (EMPNO NUMBER 4,

    ENAME VARCHAR2 (10),

    USE VARCHAR2 (9).

    MGR NUMBER 4,

    HIREDATE DATE,

    NUMBER OF SAL (7, 2)

    NUMBER OF COMM (7, 2)

    DEPTNO NUMBER (2)

    )

    /

    -records of the emp table

    create or replace type emp_table_type to table of emp_scalar_type

    /

    declare

    TB emp_table_type;

    sys deptnoList. OdciNumberList;

    BEGIN

    Select emp_scalar_type (empno, ename, job, mgr, hiredate, sal, comm, deptno)

    bulk collect into tb emp;

    Collect SELECT deptno in bulk

    IN deptnoList

    DEPARTMENT where deptno not in (select deptno table (tb));

    I'm looping 1.deptnoList.count

    dbms_output.put_Line (deptnoList (i));

    end loop;

    END;

    40

    Try this code and work with it until you understand what makes each piece.

    Select emp_scalar_type (empno, ename, job, mgr, hiredate, sal, comm, deptno)

    bulk collect into tb emp;

    See how this SIMPLE query creates instances of the EMP_SCALAR_TYPE and then use COLLECT in BULK to put them in the collection?

    Modify your code to use a SIMPLE QUERY like in my example, until you get the code to work.

  • ORA-00932: inconsistent data types: expected DATE receipt NUMBER to call OIC OCIStmtExecute OBIEE 11g

    Hi friends,

    I get this error: ORA-00932: inconsistent data types: expected DATE got the NUMBER to the call of the OIC OCIStmtExecute when I'm putting the filter on the date column condition.

    "Sun Time". " Day' < = cast (MAX ("Sun time" "." ")) Date day")) and"Sun Time ". "' Day ' > = TIMESTAMPADD (SQL_TSI_MONTH,-1, cast (MAX ("Sun time".) "Day") as date). "

    I sank the date max, but if I get the above error. I think max (date) creates the problem.

    Please suggest your opinion on that.

    Thank you.

    Thank you for your suggestions.

    I used the variable, and it helped.

    "Sun Time". " Date' <= valueof(maxdate)="" and="" "dim-time"."date"="">= TIMESTAMPADD (SQL_TSI_MONTH-1, VALUEOF (Maxdate))

  • Incompatible data type problem in the ADF

    Hello

    I'm new to ADF. I'm writing a logic in the implementation of the entity class.
    The logic contains below two lines.

    Integer itemQty = row.getQuantity ();
    Number Qty = (Number) (itemQty);

    However when compiling, error comes which says 'incompatible data types' that is the integer and the number are not compatible.
    Please let me how can know I convert an integer in Number type.

    Thank you
    Anuj
    Integer  itemQty = row.getQuantity();
    oracle.jbo.domain.Number n= null;
        try
        {
          n = new oracle.jbo.domain.Number(itemQty);
        }
        catch (SQLException e)
        {
          //handle the exception here.
        }  
    

    But why do you need to cast to oracle.jbo.domain.Number?

  • ORA-00932: inconsistent data types: expected BLOB, CLOB had TANK

    Hello
    When exporting with the EXP utility, I have the following error:
    . exporting private type synonyms
    . exporting object type definitions
    . exporting system procedural objects and actions
    . exporting pre-schema procedural objects and actions
    . exporting cluster definitions
    EXP-00056: ORACLE error 932 encountered
    ORA-00932: inconsistent datatypes: expected BLOB, CLOB got CHAR
    My question is:
    what is the schema? Can there invalid objects by preventing him from EXP (see the Note 339938.1 on metalink).

    Thank you.

    A way perhaps to query dba_feature_usage_statistics that shows in use and query dba_registry features which also shows the features installed.

    HTH - Mark D Powell.

  • Problem with the incompatible data type

    Hi all

    I wrote this query and trying to run it and got the following error.

    I got this error when I add column.if description I do not add the description column query works fine. _

    Attempted to solve by other means but did not work.

    Please help on this.

    SELECT the description, product, /*Defect.Product*/
    TO_CHAR (BG_DETECTION_DATE, 'yyyy') year,
    TO_CHAR (BG_DETECTION_DATE, 'Q'). ' Q'Quarter
    BUG
    where service_type as "Incident".
    and produced in ("Siebel", "Intg_Mgmt", "SOA", "NICE", "Genesys", "DW Analytics")
    AND DETECTION_DATE
    BETWEEN TO_DATE('01-01-2009','MM-DD-YYYY')
    AND TO_DATE (OCTOBER 30, 2010 ","DD-MM-YYYY")

    Group of to_char(bg_detection_date,'yyyy'), to_char(bg_detection_date,'Q'),
    product, description

    order by product, year desc, asc quarter


    error: ORA-00932: given inconsistent type.expected get clob_

    Try to replace every occurrence of "description" by 'dbms_lob.substr (description, 100, 1)' in your query, for example.

    It of OK if you want to show how only and group using the first 100 characters of the column "description".

  • incompatible data type

    Hi iam new on oracle plsql,.

    I have small precision please help me in this.


    CREATE or REPLACE TYPE emp_type2 AS OBJECT

    (empno NUMBER (4));

    CREATE OR REPLACE TYPE T_EMP_TYPE AS TABLE EMP_TYPE2;

    CREATE OR REPLACE PROCEDURE test12 (pout on t_emp_type)

    AS

    BEGIN

    -Emp_type2 (e.empno) SELECT COLLECT LOOSE pout OF emp e; - updated successfully

    Emp_type2 (e.EMPNO) SELECT INTO emp e pout; - getting error below

    END;

    =====================================================================================

    • Error (6.1): PL/SQL: statement ignored
    • Error (6,8): PL/SQL: ORA-00932: inconsistent data types: waiting for the TEST. EMP_TYPE2's TEST. T_EMP_TYPE

    =====================================================================================

    Please explain to me why this statement error SELECT emp_type2 (e.EMPNO) INTO pout of emp e;

    Thank you

    RAMU.

    -Emp_type2 (e.empno) SELECT COLLECT LOOSE pout OF emp e; - updated successfully

    Emp_type2 (e.EMPNO) SELECT INTO emp e pout; - getting error below


    The TYPE is the data type that can contain multiple lines.

    So by the way of multiple lines between two TYPES of needs COLLECT LOOSE (here IN won't work, INTO used to Exchange simple rows)

    That's why your 1st statement is t is successful. and the statement with INTO is a failure.

  • ORA-00932: inconsistent data types: expected - was -.

    DECLARE
    STR VARCHAR2(2000):='<SerachVal>1234</SerachVal>';
    L_OUT VARCHAR2(1000);
    BEGIN
    SELECT EXTRACTVALUE(STR,'/SerachVal') INTO L_OUT FROM DUAL;
    DBMS_OUTPUT.PUT_LINE(L_OUT);
    END;
    
    
    error:
    
    PL/SQL: ORA-00932: inconsistent datatypes: expected - got -
    PL/SQL: SQL Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    SQL> set serverout on
    SQL> DECLARE
      STR   VARCHAR2(2000):='1234';
      L_OUT VARCHAR2(1000);
    BEGIN
      SELECT EXTRACTVALUE(XMLTYPE(STR),'/SerachVal') INTO L_OUT FROM DUAL;
      DBMS_OUTPUT.PUT_LINE(L_OUT);
    END;  2    3    4    5    6    7
      8  /
    1234
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • ORA-00932: inconsistent data types: expected DATE got the NUMBER

    SELECT DISTINCT NVL (jtf.NAME, 'No Sales Credit') NAME, ract.customer_trx_id,
                    ract.trx_number, ract.bill_to_customer_id,
                    NVL (ract.primary_salesrep_id, -3) primary_salesrep_id,
                    rac.customer_name custname,
                    /*xx_nyl_sa_order_type
                                           (NVL (ract.ship_to_site_use_id,
                                                 ract.bill_to_site_use_id
                                                ),
                                            DECODE (ract.ship_to_site_use_id,
                                                    NULL, 'B',
                                                    'S'
                                                   )
                                           ) S_TYPE,RACTL.INTERFACE_LINE_ATTRIBUTE2,*/
                    xx_nyl_cust_address
                                       (NVL (ract.ship_to_site_use_id,
                                             ract.bill_to_site_use_id
                                            ),
                                        DECODE (ract.ship_to_site_use_id,
                                                NULL, 'B',
                                                'S'
                                               )
                                       ) address,
                      NVL (ractl.extended_amount, 0)
                    * NVL (ract.exchange_rate, 1) itm_sales,
                      NVL (ractl.quantity_invoiced, 0)
                    + NVL (ractl.quantity_credited, 0) qty,
                    item_dtl.itemid itemid, item_dtl.itemno itemno,
                    item_dtl.segment2, item_dtl.segment3,
                    item_dtl.attribute7 attribute7,
                    item_dtl.attribute8 attribute8,
                    item_dtl.attribute12 attribute12, item_dtl.itemdesc itemdesc,
                    ractl.inventory_item_id invid,
                --ract.ship_to_site_use_id,
    --                ract.bill_to_site_use_id,
                                                  ractl.customer_trx_line_id
               FROM ra_customer_trx_all ract,
                    ra_customer_trx_lines_all ractl,
                    jtf_rs_salesreps jtf,
                    ra_customers rac,
                    ra_cust_trx_types_all ractt,
                    hr_all_organization_units hr,
                    (SELECT DISTINCT iim.item_id itemid,
                                     msi.inventory_item_id invid,
                                     iim.item_no itemno,
                                     stk_dtl.segment2 segment2,
                                     stk_dtl.segment3 segment3,
                                     iim.attribute7 attribute7,
                                     iim.attribute8 attribute8,
                                     iim.attribute12 attribute12,
                                     iim.item_desc1 itemdesc
                                FROM ic_item_mst iim,
                                     mtl_system_items_b msi,
                                     (SELECT mtl.segment2, mtl.segment3,
                                             gmi.item_id
                                        FROM mtl_categories_b mtl,
                                             fnd_id_flex_structures_vl fndi,
                                             gmi_item_categories gmi
                                       WHERE gmi.category_id = mtl.category_id
                                         AND fndi.id_flex_structure_name =
                                                                      'Item Group'
                                         AND fndi.id_flex_num = mtl.structure_id) stk_dtl
                               WHERE iim.item_no = msi.segment1
                                 AND stk_dtl.item_id = iim.item_id) item_dtl
              WHERE ract.customer_trx_id = ractl.customer_trx_id
                AND ractl.line_type = 'LINE'
                AND ract.cust_trx_type_id = ractt.cust_trx_type_id
                AND hr.organization_id = ractl.org_id
                AND JTF.ORG_ID = RACT.ORG_ID
    --       AND ractl.inventory_item_id = 8880
                AND item_dtl.invid = ractl.inventory_item_id
                AND ractt.default_status NOT LIKE 'VD'
                AND ractl.inventory_item_id IS NOT NULL
                AND jtf.salesrep_id(+) = ract.primary_salesrep_id
                AND rac.customer_id = ract.bill_to_customer_id
                AND NVL
                       (ractl.interface_line_attribute2,
                        NVL
                           (xx_nyl_sa_order_type
                                                (NVL (ract.ship_to_site_use_id,
                                                      ract.bill_to_site_use_id
                                                     ),
                                                 DECODE (ract.ship_to_site_use_id,
                                                         NULL, 'B',
                                                         'S'
                                                        )
                                                ),
                            'Order'
                           )
                       ) =
                       NVL
                          (:p_sales_type,
                           NVL
                              (ractl.interface_line_attribute2,
                               NVL
                                  (xx_nyl_sa_order_type
                                                (NVL (ract.ship_to_site_use_id,
                                                      ract.bill_to_site_use_id
                                                     ),
                                                 DECODE (ract.ship_to_site_use_id,
                                                         NULL, 'B',
                                                         'S'
                                                        )
                                                ),
                                   'Order'
                                  )
                              )
                          )
                AND NVL (jtf.NAME, 'No Sales Credit')
                       BETWEEN NVL (:p_salesmen_from,
                                    NVL (jtf.NAME, 'No Sales Credit')
                                   )
                           AND NVL (:p_salesmen_to,
                                    NVL (jtf.NAME, 'No Sales Credit')
                                   )
                AND rac.customer_name BETWEEN NVL (:p_customer_from,
                                                   rac.customer_name
                                                  )
                                          AND NVL (:p_customer_to,
                                                   rac.customer_name
                                                  )
                AND trunc(ract.trx_date) BETWEEN trunc(:p_year_from) AND trunc(:p_year_to)

    user9093700 wrote:

    TRUNC(ract.trx_date, 'YYYY') between :p_year_from and :p_year_to
    

    ORA-01843: not one month valid

    Well, you won't get definitive answers unless you provide the requested information.
    What type of p_year_from and data p_year_to?
    Guessing based on your last two answers, it is VARCHAR2, isn't it?
    Convert to date and compare:

    trunc(ract.trx_date) between to_date(:p_year_from,'DD/MM/YYYY') AND to_date(:p_year_to,'DD/MM/YYYY')
    

    That said, store dates as string is a major shortcoming. Consider to store and maintain dates in the form of dates.

  • ORA-00932: inconsistent data types: expected NUMBER obtained CURSER

    Hello

    I created a function that returns the cursor

    try to use the same report in

    Apex 4.2.3

    Select double hapx_details(:p5_brnach,:p5_remark)

    Help, please

    function is;

    create or replace function hapx_details
    (
    brcode in d009022.lbrcode%type,
    lheading in varchar2)
    return sys_refcursor
    is
    x_cursor   sys_refcursor;
    vquery varchar2(1000);
    begin
       if upper(trim(lheading))='TERMDEPOSITS' THEN
       vquery:='select lbrcode,t_cust(lbrcode,prdacctid) custno,short_acno(prdacctid) acno,ACNAME(LBRCODE,PRDACCTID) NAME,t_ost_new(lbrcode,prdacctid,SYSDATE) bal from dep_mast where lbrcode=brcode';
       elsif upper(trim(lheading))='ADVANCES' THEN
       VQUERY:='SELECT LBRCODE,CUSTNO,SHORT_ACNO(LBRCODE,PRDACCTID)ACNO,NAMETITLE,LONGNAME NAME ,t_ost_new(lbrcode,prdacctid,SYSDATE) bal FROM ac_mast WHERE LBRCODE=BRCODE AND (LBRCODE,TRIM(SUBSTR(PRDACCTID,1,8))) IN (SELECT LBRCODE,TRIM(PRDCD) FROM D009021 WHERE MODULETYPE IN (13,14,30)) AND ACCTSTAT<>3';
       ELSE
       VQUERY:='SELECT LBRCODE,CUSTNO,SHORT_ACNO(LBRCODE,PRDACCTID)ACNO,NAMETITLE,LONGNAME NAME,t_ost_new(lbrcode,prdacctid,SYSDATE) bal FROM ac_mast WHERE LBRCODE=BRCODE AND (LBRCODE,TRIM(SUBSTR(PRDACCTID,1,8))) IN (SELECT LBRCODE,TRIM(PRDCD) FROM D009021 WHERE MODULETYPE IN (11,12)) AND ACCTSTAT<>3';
       END IF;
    --
       OPEN X_CURSOR FOR
       VQUERY;
       RETURN X_CURSOR;
    END HAPX_DETAILS;
    
    
    

    The proper way is to define a function that returns the SQL statement (with bind variable) Apex need to run to the region to report.

    Say you have a region that reports of departments (Department variable is zero) or employed in a service (Department non-null variable).

    You have a page element called P1_DEPT that specifies the Department.

    You create the function call following the report:

    () MyDynamicReport

    depatvalue =>: P1_DEPT,-value of variable in apex

    deptvariable-online "P1_DEPT" - the apex variable name

    );

    The function can now determine what is SQL and who will return to the Apex engine for processing:

    create or replace function MyDynamicReport (deptValue number, deptVar varchar2) return varchar2 is

    sqlQuery varchar2 (1000);

    Start

    If deptValue is null then

    -no service selected, so ask all the departments

    sqlQuery: = ' select * from dept by dept_id';

    on the other

    -service selected, so display employees in the Department

    -(and use the link provided in the SQL query variable)

    sqlQuery: = ' select * from emp where dept_id = :'|| deptVar | "order by emp_id;

    end if;

    return (sqlQuery);

    end;

    When you create a ref cursor, you pass the VALUE of the variable for the ref cursor to be used as a variable binding.

    With a dynamic query Apex, you must pass the NAME of the variable for the function to use and add in the text of the dynamic query.

    To using a function table of pipeline to do this, is rather silly.

Maybe you are looking for

  • Car power adapter foa a P25-S670

    Hi, I have a Satellite P25-S670 and I want to buy a car adapter, but I was unable to find that say it is compatible, everything here was telling me wishing that I could use, model and manufacturer, not able to find one on targus, so thanks for your h

  • Satellite A30: HDD started making a humming noise

    Hello The hard drive started making a noise on my A30, I suppose that is not good news, that is it is Kaput? I downloaded HDDLife telling me that the hard drive is all ok, but I feel very confident. I backed everything up and think of a hard drive re

  • Pavilion 17-e148ca: Bluetooth on HP Pavilion windows 17-e148ca 10

    Hello, I can not find Bluetooth on my HP pavilion Pavilion 17-e148ca. I had it on windows 8.1, but he disappeared after update. http://support.HP.com/us-en/product/HP-Pavilion-17-e100-notebook-PC-series/5401229/model/6825874/doc...      Watch bluetoo

  • Live Essentials 2011 install but does not work

    I downloaded Live Essentials 2011 a few days ago, but none of them work. All answers so I have to close the software by force. I installed them very well, but it does not work is this a general problem or just me? want to learn how to fix it. BTW, my

  • Brightness on windows xp

    I installed windows xp on Dell latitude knees. When I press the function key + up/down arrow to adjust the brightness, the brightness was not adjusted. How can I adjust the brightness?