ORA-30352: inconsistent numeric precision or string length

Trying to create a materialized view and am getting this error.
ORA-30352: inconsistent numeric precision or string length
How do I fix this?

Mix and matching of types with my facts and dimensions. Making them the same resolved this.
Edited by: user7853353 on Jun 18, 2012 5:33 PM

Similar Messages

  • ORA-01727 during impdp transportable datafiles:numeric precision specifier

    I started impdp the rman converted the datafiles into tartget and got error on one of the table:
    ORA-01727: numeric precision specifier is out of range 1 to 38
    I tried to fix it by create the table definition by change several columns number (126) to number (38), it worked, and then I tried to impdp again with tables=tablename
    content=data_only, it give me error that the imp dump file is specific for transportable tablespace.
    I dont know how to fix this issue. Can anybody help on this?
    Thanks in advance.

    Here is the error after I created the table and then trying to import the data:
    impdp system/password dumpfile=dp_tts.dmp table_exists_action=APPEND tables=asset.customer_ticket content=data_only;
    Import: Release 11.2.0.3.0 - Production on Mon May 6 01:01:41 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    ORA-39002: invalid operation
    ORA-39061: import mode TABLE conflicts with export mode TRANSPORTABLE

  • - ORA-01727: numeric precision specifier is out of range (1 to 38)

    What is cause of above error??
    SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task_1') from DUAL;
    DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK_1')
    GENERAL INFORMATION SECTION
    Tuning Task Name : my_sql_tuning_task_1
    Tuning Task Owner : SYS
    Workload Type : Single SQL Statement
    Scope : COMPREHENSIVE
    Time Limit(seconds): 3600
    Completion Status : COMPLETED
    Started at : 09/27/2012 13:24:45
    Completed at : 09/27/2012 13:24:45
    Schema Name: PDS
    SQL ID : 4wv8x1b10dvk0
    SQL Text : INSERT INTO dlg_participant
    (dp_dg_id, dp_dlg_id, dp_customer_id, dp_context,
    dp_inserted_timestamp, dp_moved_timestamp, dp_active,
    dp_internal_id)
    (SELECT
    cast(:1 as number(:"SYS_B_0")),
    cast(:2 as number(:"SYS_B_1")),
    mh_customer_id,
    mh_context,
    SYSDATE,
    SYSDATE,
    cast(:3 as number(:"SYS_B_2")),
    cast(:4 as number(:"SYS_B_3"))
    FROM
    (SELECT
    Relations.MARE_ID as mh_customer_id,
    :"SYS_B_4" as mh_context,
    null as mh_participant_id
    FROM
    (select *
    from Testuser.RelationsEnriched_10M
    ) Relations
    WHERE
    ((:5 >= Relations.MARE_ID))) AND
    NOT EXISTS (SELECT
    dp_id
    FROM
    dlg_participant,
    dlg_group
    WHERE
    (dp_dg_id = dg_id) AND
    (dg_dlg_id = :6) AND
    (dp_active = :7) AND
    (dp_customer_id = Relations.MARE_ID))) mh_container)
    Bind Variables :
    2 - (NUMBER):9
    4 - (NUMBER):9
    6 - (NUMBER):18
    8 - (NUMBER):18
    10 - (NUMBER):1500000
    11 - (NUMBER):1053
    12 - (NUMBER):0
    ERRORS SECTION
    - ORA-01727: numeric precision specifier is out of range (1 to 38)
    -------------------------------------------------------------------------------

    Strange as none of the number datatype is more than 38
    SQL> desc testuser.relationsenriched_10m
    Name Null? Type
    MAEX_VALUE_CODE_002 NUMBER(38)
    MAEX_PHONE_IND_DATE DATE
    MAEX_TOTAL_SWITCH_DATE DATE
    MAEX_VALUE_CODE_002_DATE DATE
    MARE_COMP_FS_PC VARCHAR2(199)
    MARE_DEALER_RETAIL VARCHAR2(7)
    MARE_CONSODATA_IND VARCHAR2(2)
    MAEX_VALUE_CODE_003 NUMBER(38)
    MARE_EXT_KEY1_NR VARCHAR2(199)
    MARE_GM_CARD_CODE VARCHAR2(199)
    MAEX_LAST_CHANGE_DATE DATE
    MAAD_MARE_ID NUMBER(38)
    MAEX_MAIL_IND_DATE DATE
    MARE_PERS_TITLE VARCHAR2(6)
    MARE_EXT_KEY3_NR VARCHAR2(199)
    MARE_BSM_DATE VARCHAR2(199)
    MARE_ID NUMBER(38)
    MARE_GM_CARD_STATUS VARCHAR2(199)
    MAAD_PREFERED_IND VARCHAR2(2)
    MAEX_SMS_IND_DATE DATE
    MARE_RELATED_CODE VARCHAR2(199)
    MARE_FAX FLOAT(126)
    MACA_MARE_ID NUMBER(38)
    MACA_REGDATE_OWNER_YEAR NUMBER(38)
    MAEX_EMAIL_IND_DATE DATE
    MAEX_MAILABLE_IND6 VARCHAR2(2)
    MARE_PERS_LAST_NAME VARCHAR2(42)
    MARE_PERS_SALUTATION VARCHAR2(9)
    MARE_PERS_FIRST_NAMES VARCHAR2(51)
    MARE_SUB_TYPE VARCHAR2(2)
    MACA_PREFERED_IND VARCHAR2(2)
    MAEX_CONTROL_GROUP_DATE DATE
    MARE_MOBILE_PHONE VARCHAR2(21)
    MARE_COMP_ID NUMBER(38)
    MARE_EXT_KEY1_CHAR VARCHAR2(16)
    MARE_FIRST_CONTACT_DATE DATE
    MARE_MOI1_DESCR VARCHAR2(21)
    MAEX_MAILABLE_IND9 VARCHAR2(2)
    MARE_MOI1 VARCHAR2(11)
    MARE_MAAD_ID_T NUMBER(38)
    MARE_COMP_SIZE_CAT NUMBER(38)
    MAEX_SMS_IND VARCHAR2(2)
    MARE_PERS_LAST_NAME_SECOND VARCHAR2(15)
    MAEX_VALUE_CODE_001_DATE DATE
    MARE_ORDER_T NUMBER(38)
    MARE_BSM_IND VARCHAR2(2)
    MACA_BRAND VARCHAR2(12)
    MACA_DEALER_RETAIL VARCHAR2(7)
    MARE_HOME_PHONE VARCHAR2(21)
    MAEX_MAIL_IND VARCHAR2(2)
    MARE_PERS_BIRTH_DATE DATE
    MARE_CNSMR_TYPE VARCHAR2(2)
    MAEX_MAILABLE_IND5 VARCHAR2(2)
    MARE_PERS_AGE NUMBER(38)
    MAEX_MAILABLE_IND1 VARCHAR2(2)
    MARE_INSRC_RNWL_DATE DATE
    MACA_NEW_USED VARCHAR2(5)
    MARE_LOAD_DATE DATE
    MARE_PERS_MAR_STATUS VARCHAR2(199)
    MARE_PERS_PREFIX VARCHAR2(7)
    MARE_COMP_SIZE NUMBER(38)
    MAEX_VALUE_CODE_100_DATE DATE
    MARE_HISTORY_FILE VARCHAR2(26)
    MARE_COMP_NAME VARCHAR2(108)
    MARE_IDX_T VARCHAR2(51)
    MARE_DEALER_RETAIL_NAME VARCHAR2(41)
    MACA_OWNER_TYPE VARCHAR2(2)
    MARE_CREATION_DATE DATE
    MARE_MACA_ID_T NUMBER(38)
    MARE_EXT_KEY3_CHAR VARCHAR2(199)
    MAAD_POSTAL_CODE VARCHAR2(8)
    MAEX_MARE_ID NUMBER(38)
    MARE_CNSMR_TYPE_CODE NUMBER(38)
    MARE_SOURCE VARCHAR2(5)
    MARE_LAST_CONTACT_DATE DATE
    MARE_EXT_KEY2_CHAR VARCHAR2(199)
    MAEX_ID NUMBER(38)
    MAEX_TOTAL_SWITCH VARCHAR2(2)
    MARE_EMAIL VARCHAR2(53)
    MARE_DEALER_SERV_NAME VARCHAR2(41)
    MARE_WORK_PHONE VARCHAR2(21)
    MAEX_VALUE_CODE_100 NUMBER(38)
    MAEX_PHONE_IND VARCHAR2(2)
    MARE_AERD VARCHAR2(199)
    MARE_SPS_FILE_ID NUMBER(38)
    MAEX_LOAD_DATE DATE
    MARE_MOI5 VARCHAR2(11)
    MAEX_MAILABLE_IND7 VARCHAR2(2)
    MAEX_VALUE_CODE_001 NUMBER(38)
    MARE_COMP_NAME_2 VARCHAR2(172)
    MARE_SOFI_NR VARCHAR2(17)
    MARE_COMP_CODE VARCHAR2(199)
    MARE_COMP_FS_CC VARCHAR2(199)
    MAEX_MAILABLE_IND4 VARCHAR2(2)
    MARE_DEALER_PREF VARCHAR2(7)
    MARE_LANG_CODE VARCHAR2(3)
    MACA_REGDATE_CAR_YEAR NUMBER(38)
    MARE_PERS_INITIALS VARCHAR2(7)
    MARE_DEAR_SALUTATION VARCHAR2(50)
    MAEX_MAILABLE_IND8 VARCHAR2(2)
    MAEX_TITLE_IND VARCHAR2(2)
    MARE_MATCHING_IDX VARCHAR2(199)
    MARE_MOI3 VARCHAR2(11)
    MARE_DEALER_PREF_NAME VARCHAR2(2)
    MARE_ENVELOPE_NAME VARCHAR2(199)
    MARE_PERS_CHILD_UNDER_18 VARCHAR2(199)
    MARE_MOI2 VARCHAR2(11)
    MARE_RELATED_DESCR VARCHAR2(199)
    MARE_EXT_KEY2_NR VARCHAR2(199)
    MARE_PERS_GENDER VARCHAR2(2)
    MACA_MODEL VARCHAR2(16)
    MARE_PERS_HH_SIZE VARCHAR2(199)
    MAEX_TITLE_IND_DATE DATE
    MARE_LAST_CHANGE_DATE DATE
    MARE_MOI4 VARCHAR2(11)
    MAEX_MAILABLE_IND2 VARCHAR2(2)
    MARE_DEALER_SERV VARCHAR2(7)
    MAEX_VALUE_CODES VARCHAR2(25)
    MARE_NAME_T VARCHAR2(51)
    MAEX_VALUE_CODE_003_DATE DATE
    MARE_PERS_HH_CARS VARCHAR2(199)
    MAEX_MAILABLE_IND3 VARCHAR2(2)
    MARE_ERD NUMBER(38)
    MAEX_CREATION_DATE DATE
    MARE_IERD VARCHAR2(199)
    MAEX_CONTROL_GROUP NUMBER(38)
    MAEX_EMAIL_IND VARCHAR2(2)
    MARE_COMP_FS_TOT VARCHAR2(199)
    MARE_RELT_ID NUMBER(38)
    MARE_PERS_ID NUMBER(38)
    SQL> desc pds.dlg_participant
    Name Null? Type
    DP_ID NOT NULL NUMBER(18)
    DP_DG_ID NOT NULL NUMBER(9)
    DP_DLG_ID NOT NULL NUMBER(9)
    DP_CUSTOMER_ID NOT NULL NUMBER(38)
    DP_CONTEXT NOT NULL NVARCHAR2(128)
    DP_INSERTED_TIMESTAMP NOT NULL DATE
    DP_MOVED_TIMESTAMP NOT NULL DATE
    DP_PART_STAMP NVARCHAR2(3)
    DP_ACTIVE NOT NULL NUMBER(18)
    DP_INTERNAL_ID NUMBER(18)
    DP_CUSTOM_VALUES NCLOB

  • Numeric Precision Error

    Hi,
    I am using ODP 10.2.0.2.21 with c# and .Net 2.0 and Oracle 10g.
    Most of my stored procedures output the results back to the caller in the form of a generic REF CURSOR. When I call OracleDataAdapter.Fill to populate a data-set using a call to one of these stored procedures, it works fine as long as the stored procedure returns data. If no rows are returned, I get the following error:
    [Oracle.DataAccess.Types.OracleTypeException]: numeric precision specifier is out of range (1 to 38).
    Looking up this error, I've found that it normally occurs as a result of an attempt to run some DDL SQL that creates a table with a numeric column whose precision exceeds the maximum allowable e.g. numeric(39). This is not the case here, as the stored procedures that are failing are mostly pure select statements and do not even utilise temporary tables or bulk collection. It is almost as if the OracleDataAdapter is unable to get the schema representation of the column when there is not at least one row of data.
    I have pasted the full exception stack below:
    at Oracle.DataAccess.Types.OracleDecimal.ConvertToPrecScale(OracleDecimal value1, Int32 precision, Int32 scale)
    at Oracle.DataAccess.Client.OracleParameter.PreBind_Decimal()
    at Oracle.DataAccess.Client.OracleParameter.PreBind(OracleConnection conn, IntPtr errCtx, Int32 arraySize)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
    at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
    Any help on this would be appreciated.
    Regards
    Roy Griffiths.

    Hi Mark,
    It would be difficult to distill this down to a small enough example to post, but I could email you an example if you want.
    I have done a bit more investigation however, and believe that I have found the cause of the problem.
    My application obtains the parameters for any stored procedure that it calls using OracleCommandBuilder.DeriveParameters. As this is an expensive call (it requires a round trip to the database), I cache the output when a stored procedure is called for the first time. Specifically, I store a number of properties for each stored procedure parameter, including its precision and scale. I then use the cached properties to build the parameters collection on the command object when the stored procedure is called.
    I've noticed that the OracleParameter.Precision and OracleParameter.Scale properties always return zero, regardless of the definition of the parameter on the stored procedure. I've also noticed that there are 2 private member variables (m_precision and m_scale) that contain non-zero values. If I use reflection to obtain and cache these values and use them to set the scale and precision of Command.Parameters[n] then the problem goes away.
    I'm not particularly keen on this as a solution however, and would much rather use the public properties for precision and scale (OracleParameter.Precision and OracleParameter.Scale). Do you have any idea why they don't return values?
    Regards
    Roy.

  • Removing non-numeric characters from string

    Hi there,
    I need to have the ability to remove non-numeric characters from a string and I do not know how to do this.
    Does any one know a way?
    Example:
    Present String: (02)-2345-4607
    Required String: 0223454607
    Thanks in advance

    Dear NickM
    Try this this will work...........
    create or replace function char2num(mstring in varchar2) return integer
    is
    -- Function to remove Special characters and alphebets from phone no. string field
    -- Author - Valid Bharde.(India-Mumbai)
    -- Date :- 20 Sept 2006.
    -- This Function will return numeric representation.
    -- The Folowing program is gifted to NickM with respect to his post on oracle site regarding Removing non-numeric characters from string on the said date
    mstatus number :=0;
    mnum number:=0;
    mrefstring varchar2(50);
    begin
    mnum := length(mstring);
    for x in 1..mnum loop
    if (ASCII(substr(upper(mstring),x,1)) >= 48 and ASCII(substr(upper(mstring),x,1)) <= 57) then
    mrefstring := mrefstring || substr(mstring,x,1);
    end if;
    end loop;
    return mrefstring;
    end;
    copy the above program and use it at function for example
    SQL> select char2num('(022)-453452781') from dual;
    CHAR2NUM('(022)-453452781')
    22453452781
    Chao!!!

  • ORA-00932: inconsistent datatypes: expected NUMBER got DATE

    I have a DAC task that is failing and I am getting the message below in the logs
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    Attached below is the SQL for the mapping concerned, I am trying to figure this out so that I can run this ETL successfully.
    Any leads would be greatly appreciated.
    READER_1_1_1> CMN_1761 Timestamp Event: [Fri Nov 15 17:00:29 2013]
    READER_1_1_1> RR_4035 SQL Error [
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    Database driver error...
    Function Name : Fetch
    SQL Stmt : SELECT
    PS_ITEM_DST.BUSINESS_UNIT_GL , PS_ITEM_DST.ACCOUNT , PS_ITEM_DST.ALTACCT , PS_ITEM_DST.DEPTID , PS_ITEM_DST.OPERATING_UNIT , PS_ITEM_DST.PRODUCT , PS_ITEM_DST.FUND_CODE , PS_ITEM_DST.CLASS_FLD , PS_ITEM_DST.PROGRAM_CODE , PS_ITEM_DST.BUDGET_REF , PS_ITEM_DST.AFFILIATE , PS_ITEM_DST.AFFILIATE_INTRA1 , PS_ITEM_DST.AFFILIATE_INTRA2 , PS_ITEM_DST.CHARTFIELD1 , PS_ITEM_DST.CHARTFIELD2 , PS_ITEM_DST.CHARTFIELD3 , PS_BI_LINE.PROJECT_ID , PS_ITEM_DST.STATISTICS_CODE , PS_ITEM.CUST_ID , PS_ITEM.ADDRESS_SEQ_NUM , PS_BI_HDR.SHIP_TO_CUST_ID , PS_BI_HDR.SHIP_TO_ADDR_NUM , PS_BI_HDR.SOLD_TO_CUST_ID , PS_BI_HDR.SOLD_TO_ADDR_NUM , PS_ITEM_DST.FOREIGN_AMOUNT , PS_ITEM_DST.MONETARY_AMOUNT , PS_ITEM_DST.FOREIGN_CURRENCY , PS_ITEM_DST.CURRENCY_CD , PS_ITEM_DST.BUSINESS_UNIT , PS_ITEM_DST.ITEM , PS_ITEM_DST.ITEM_LINE , PS_ITEM_DST.ITEM_SEQ_NUM , PS_ITEM_DST.DST_SEQ_NUM , PS_ITEM_DST.JOURNAL_ID , PS_ITEM_DST.JOURNAL_DATE , PS_ITEM_DST.JOURNAL_LINE , PS_ITEM_DST.GL_DISTRIB_STATUS , PS_ITEM_DST.LEDGER_GROUP , PS_ITEM_DST.LEDGER , SALESPERSON.EMPLID , PS_ITEM_ACTIVITY.COLLECTOR , PS_ITEM_ACTIVITY.ENTRY_TYPE , PS_ITEM_ACTIVITY.ENTRY_REASON , PS_ITEM_ACTIVITY.BANK_SETID , PS_ITEM_ACTIVITY.BANK_CD , PS_ITEM_ACTIVITY.BANK_ACCT_KEY , PS_ITEM_ACTIVITY.DEPOSIT_ID , PS_ITEM_ACTIVITY.PAYMENT_SEQ_NUM , PS_ITEM_ACTIVITY.GROUP_TYPE , PS_ITEM_ACTIVITY.POST_DT , PS_ITEM_ACTIVITY.ACCOUNTING_DT , PS_ITEM.BAL_AMT , PS_ITEM.ORIG_ITEM_AMT , PS_ITEM.ITEM_STATUS , PS_ITEM.PYMNT_TERMS_CD , PS_ITEM.DUE_DT , PS_ITEM.PO_REF , PS_ITEM.PO_LINE , PS_ITEM.ASOF_DT , PS_BI_HDR.DT_INVOICED , PS_BI_HDR.INVOICE_DT , PS_GROUP_CONTROL.OPRID , PS_ITEM.BUSINESS_UNIT_OM , PSPRCSRQST.RUNDTTM , PS_JRNL_HEADER.DTTM_STAMP_SEC , PSPRCSRQST1.RUNDTTM , PS_BI_HDR.LAST_UPDATE_DTTM , PS_JRNL_HEADER.JRNL_HDR_STATUS , PS_BI_LINE.TAX_CD , PS_BI_LINE.QTY , PS_BI_LINE.LAST_UPDATE_DTTM , PS_JRNL_HEADER.UNPOST_SEQ , PS_ITEM_DST.BUSINESS_UNIT_PC , PS_ITEM_DST.ACTIVITY_ID , PS_ITEM_DST.ANALYSIS_TYPE , PS_ITEM_DST.RESOURCE_TYPE , PS_ITEM_DST.RESOURCE_CATEGORY , PS_ITEM_DST.RESOURCE_SUB_CAT , PS_BI_LINE.CONTRACT_NUM
    FROM
    PS_ITEM_DST,
    PS_ITEM_ACTIVITY,
    PS_ITEM,
    PS_BI_HDR,
    PS_BI_LINE,
    PS_GROUP_CONTROL,
    PSPRCSRQST,
    PSPRCSRQST PSPRCSRQST1,
    PS_JRNL_HEADER,
    (SELECT A.SETCNTRLVALUE, B.SUPPORT_TEAM_MBR, B.EMPLID
    FROM PS_SET_CNTRL_REC A, PS_MEMBER_PERSON B
    WHERE A.SETID = B.SETID AND A.RECNAME = 'MEMBER_PERSON') SALESPERSON
    WHERE
    PS_ITEM_DST.BUSINESS_UNIT = PS_ITEM_ACTIVITY.BUSINESS_UNIT(+) AND PS_ITEM_DST.CUST_ID = PS_ITEM_ACTIVITY.CUST_ID(+) AND PS_ITEM_DST.ITEM = PS_ITEM_ACTIVITY.ITEM(+) AND PS_ITEM_DST.ITEM_LINE = PS_ITEM_ACTIVITY.ITEM_LINE(+) AND PS_ITEM_DST.ITEM_SEQ_NUM = PS_ITEM_ACTIVITY.ITEM_SEQ_NUM(+) AND PS_ITEM_DST.BUSINESS_UNIT = PS_ITEM.BUSINESS_UNIT(+) AND PS_ITEM_DST.CUST_ID = PS_ITEM.CUST_ID(+) AND PS_ITEM_DST.ITEM = PS_ITEM.ITEM(+) AND PS_ITEM_DST.ITEM_LINE = PS_ITEM.ITEM_LINE(+) AND PS_ITEM.BUSINESS_UNIT_BI = PS_BI_HDR.BUSINESS_UNIT(+) AND PS_ITEM.ITEM = PS_BI_HDR.INVOICE(+) AND PS_ITEM_DST.BUSINESS_UNIT_GL = PS_BI_LINE.BUSINESS_UNIT(+) AND PS_ITEM_DST.ITEM = PS_BI_LINE.INVOICE(+) AND PS_ITEM_DST.ITEM_SEQ_NUM = PS_BI_LINE.LINE_SEQ_NUM(+) AND PS_ITEM_ACTIVITY.GROUP_ID = PS_GROUP_CONTROL.GROUP_ID(+) AND PS_ITEM_ACTIVITY.GROUP_BU = PS_GROUP_CONTROL.GROUP_BU(+) AND PS_ITEM_DST.PROCESS_INSTANCE = PSPRCSRQST.PRCSINSTANCE(+) AND PS_ITEM_DST.BUSINESS_UNIT_GL = PS_JRNL_HEADER.BUSINESS_UNIT(+) AND PS_ITEM_DST.JOURNAL_ID = PS_JRNL_HEADER.JOURNAL_ID(+) AND PS_ITEM_DST.JOURNAL_DATE = PS_JRNL_HEADER.JOURNAL_DATE(+) AND PS_JRNL_HEADER.UNPOST_SEQ(+) = 0 AND PS_JRNL_HEADER.PROCESS_INSTANCE = PSPRCSRQST1.PRCSINSTANCE(+) AND PS_ITEM_ACTIVITY.BUSINESS_UNIT = SALESPERSON.SETCNTRLVALUE(+) AND PS_ITEM_ACTIVITY.SALES_PERSON = SALESPERSON.SUPPORT_TEAM_MBR(+)
    AND PS_ITEM_ACTIVITY.ENTRY_TYPE <> 'CR'
    --AND PS_ITEM_DST.GL_DISTRIB_STATUS <> 'I'
    --AND PS_ITEM_DST.GL_DISTRIB_STATUS ='D'

    It might be data issue.
    You may narrow down using length of the particular column.
    ex: date column length less than 8 or 10 might be an issue

  • Ora-00932 inconsistent datatypes expected got clob

    How can I get rid of this error in my query?
    ora-00932 inconsistent datatypes expected got clob
    The Maximum length of the object is 51465

    Hello,
    I would like to convert LONG into LOB. I get the following error.
    SQL> desc all_views
    Name                                      Null?    Typ
    OWNER                                     NOT NULL VARCHAR2(30)
    VIEW_NAME                                 NOT NULL VARCHAR2(30)
    TEXT_LENGTH                                        NUMBER
    TEXT                                               LONG
    TYPE_TEXT_LENGTH                                   NUMBER
    TYPE_TEXT                                          VARCHAR2(4000)
    OID_TEXT_LENGTH                                    NUMBER
    OID_TEXT                                           VARCHAR2(4000)
    VIEW_TYPE_OWNER                                    VARCHAR2(30)
    VIEW_TYPE                                          VARCHAR2(30)
    SUPERVIEW_NAME                                     VARCHAR2(30)
    SQL> SELECT to_lob(text) from all_views
      2  where rownum <= 1;
    SELECT to_lob(text) from all_views
    FEHLER in Zeile 1:
    ORA-00932: Inkonsistente Datentypen: - erwartet, LONG erhaltenDoes anybody have an idea?

  • ORA-00932: inconsistent datatype: expected SYS.ALERT_TYPE

    Hi,
    I am developing a c# application for getting notifications from SYS.ALERT_QUE (maintained by oracle for alerts). When I try to enque something in queue(SYS.ALERT_QUE) it throws an exception "ORA-00932: inconsistent datatype: expected SYS.ALERT_TYPE". I tried the same code for different queue(cretaed by me in SYS) and it is running fine and getting notification messages too.Do I need to add some additional parameter to access SYS.ALERT_QUE? I am posting the code plz let me know what needs to be done to this code to work for SYS.ALERT_QUE.
    OracleConnection con = new OracleConnection(constr);
    // Create queue
    OracleAQQueue queue = new OracleAQQueue("sys.alert_que", con);
    try
    // Open connection
    con.Open();
    // Set message type for the queue
    queue.MessageType = OracleAQMessageType.Xml;
    queue.NotificationConsumers = new string[1] { "SUBSCRIBER1" };
    // Add the event handler to handle the notification. The
    // MsgReceived method will be invoked when a message is enqueued
    queue.MessageAvailable +=
    new OracleAQMessageAvailableEventHandler(Notification.MsgReceived);
    Console.WriteLine("Notification registered...");
    // Begin txn for enqueue
    OracleTransaction txn = con.BeginTransaction();
    Console.WriteLine("Now enqueuing message...");
    // Prepare messages with XML payload
    OracleAQMessage[] enqMsgs = new OracleAQMessage[1];
    OracleXmlType msg1 = new OracleXmlType(con, "<PERSON><FIRSTNAME>Bob</FIRSTNAME></PERSON>");
    enqMsgs[0] = new OracleAQMessage(msg1);
    OracleAQAgent[] agent = new OracleAQAgent[1];
    agent[0] = new OracleAQAgent("SUBSCRIBER1");
    enqMsgs[0].Recipients = agent;
    enqMsgs[0].SenderId = new OracleAQAgent("SENDER1");
    // Prepare to Enqueue
    queue.EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    // Enqueue message array
    queue.EnqueueArray(enqMsgs);
    txn.Commit();
    // Loop while waiting for notification
    while (isNotified == false)
    System.Threading.Thread.Sleep(2000);
    catch (Exception e)
    Console.WriteLine("Error: {0}", e.Message);
    }

    Asif,
    As the error message indicates, there is no mapping between java boolean type and PL/SQL data type.
    No, BOOLEAN type in PL/SQL is not mapped to boolean in java.
    As a workaround, I suggest using an int.
    Good Luck,
    Avi.
    P.S. I think the Java in the Oracle Database forum is more appropriate for your question.

  • Case expression and ORA-00932: inconsistent datatypes

    I m trying to use the following case condition
    select
    case
    when
    count(exception.exception_number) > 1
    then 0
    else
      ENTITY_TYPE_DEF.NAME
    end as NAME
    In table exception , exception_number has a varchar2 datatype. My requirement is such as if the count of exception number is more than 1 , it should show 0 (integer ) and if not then show name column (varchar2) from table entity_type_def .
    My query fails with following error
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
    Please could someone suggest a workaround for above issue.

    Whatever is the data type of the first case result, it expects all case results to be the same. The first part of your CASE returns 0 which is a number, it expects the second part to also return a number but it returns a string. Hence the error. You can fix it by returning a string in the first part of your case which you do by putting single quotes around your 0.
    CASE WHEN count(exception.exception_number) > THEN '0'
    ELSE entity_type_def.name END

  • Numeric literal from string

    Hi,
    I have a string which contains the name of the customer, followed by phone number. There is no specific length for the name part and the tel number( I cannot use the substring method directly). The tel number is sometimes followed by address( cannot take the last 10 chars as the tel num either).
    I need to parse the string for customer's name and tel number. Is there a way to identify the numeric literal from the string?
    If I can identify the first numeric in the string, the next 10 characters would be the tel number!

    Have a look at the String method charAt(), and the static Character method isDigit(). Between them these will let you decide whether or not the string starts with a digit.
    If that doesn't help you need to be clear about (and describe clearly) the structure of the string you are parsing. It sounds like it could have one of the following forms (but I could be wrong about this):<name length unknown><10 digit phone>[optional address length unknown]
    <10 digit phone>[optional address length unknown]<name length unknown>Assuming the name consists of non digit characters, the phone number is the first 10 digit characters in the string. It would appear to be impossible to parse the name in the second case (unless you know it always starts with a digit).

  • Sync error....ORA-00932 Inconsistent datatypes

    Hey all,
    I am getting the following error when syncing:
    MS-9109 n@86e554 (this seems to be random string) || ORA-00932: inconsistent datatypes
    Now, I've narrowed it down to the field that causes this error to occur. It is important to note that if I don't touch the field (just keep the initial value from the initial sync to 8.1.7, things sync fine.
    The error only occurs if I change the field value in 9iLite (which I am doing through me eVB app).
    In 9iLite it is defined as:
    Data_Type = Number, Len = 5, N = Y, Prec = 5, Scale = 4
    In 8.1.7 it is defined as:
    Data_type = Number (5,4) Null = N
    I'm not sure why in Lite null is Y and in 8.1.7 null is N. I just let Oracle create the lite tables based on my snapshot. At any rate, the field is not null.
    Does anyone have any thoughts? Does anyone know what the first part (MS-9109) of the error message is about? I can't find anything on it in Google.
    Thx.
    Darren

    Well,
    If fixed my problem. I just re-wrote the sql I had defined in the snapshot for the table in question. Still not sure why it didn't initally work as I didn't change the logic at all.
    Darren.

  • Why do I get this error? ORA-00932: inconsistent datatypes

    This is my stored procedure I've created to select only the exact amount of records per page for a GridView (for ASP.NET):
    CREATE OR REPLACE
    PROCEDURE SELECT_COMMAND
    (pTable IN VARCHAR2
    , pFields IN VARCHAR2
    , pSortField IN VARCHAR2
    , pPageIndex IN NUMBER
    , pTotalRecs IN NUMBER
    , pResultSet OUT SYS_REFCURSOR
    ) AS
    BEGIN 
      EXECUTE IMMEDIATE
      'SELECT ' || pFields || ' FROM '
      || '(SELECT '|| pFields ||', ROW_NUMBER() OVER(ORDER BY '|| pSortField ||') ROW_NUM '
      || 'FROM '|| pTable ||') WHERE ROW_NUM BETWEEN '|| to_char(pPageIndex*pTotalRecs) ||' AND '
      || to_char((pPageIndex+1)*pTotalRecs)   
      INTO pResultSet;
      -- Plus 1 to our index because GridView is a zeroth index collection
    END SELECT_COMMAND;I then do a test case with the following paremeters:
    declare
    p_test sys_refcursor;
    begin
    select_command('v_sig_devices', '"JOB", "LINE"', '"DEVICE_ID"', 0, 10, p_test);
    end;But I get the following error:
    >
    Error report: ORA-00932: inconsistent datatypes: expected - got -
    ORA-06512: at "SIM.SELECT_COMMAND", line 10
    ORA-06512: at line 4
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    >
    At first Oracle gave me an error because the numbers were not a string. Then I convert them into a string (with to_char) and Oracle is still not happy! Any ideas as to why this is happening?
    Thanks for any help that you can provide.

    You don't select into ref cursors, you open them:
    SQL> create table t(c varchar2(1));
    Table created.
    SQL> insert into t values ('a');
    1 row created.
    SQL> insert into t values ('b');
    1 row created.
    SQL> insert into t values ('c');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> create or replace
      2  procedure p (p_ref out sys_refcursor) as
      3  begin
      4     open p_ref for 'select c from t';
      5  end;
      6  /
    Procedure created.
    SQL> var results refcursor
    SQL> exec p(:results);
    PL/SQL procedure successfully completed.
    SQL> print results
    C
    a
    b
    c

  • Quote Form: Repeatively Query gives Error:ORA-06502: PLSQL numeric or value

    Hi,
    I am trying to query the sales order form (in Order Management) with the order number.
    Steps to Reporduce:
    Without closing the sales order form, query the same/different order number repetively again and again (upto 30 times) in sales order form and i am getting the following error. It might be due to the form buffer error i think, but i want to know how to resolve this issue.
    ORA-06502 : PLSQL : numeric or value error
    I have suggested the workaround as closing the form after querying every 15 times, but the customer needs a permanent fix by querying continously without closing the form, they want to query the record. Please suggest how to resolve this issue.
    Thanks

    The errors comes when in variable or fields data is coming more than the maximum length it.
    e.g
    declare
    vcheck varchar2(1) := 'ABC'; ---Errorplz share your code where you feel the problem might occurring usually POST-QUERY trigger.
    Baig,
    http://baigsorcl.blogspot.com

  • Restrict the input string length

    Hi, how do I restrict the input string length in a JTextField. Suppose if I want my text field to accept only 4 characters, the fifth character I try to enter shouldn't be accepted in the field.
    Thanks,
    Kalyan.

    This is for 6 characters limit
    //create a JTextField that is six characters long
    JTextField textField = new JTextField(new FixedNumericDocument(5,true),"", 6);
    Here boolean true means only numeric. set to false to take in alphanumeric.
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    public class FixedNumericDocument extends PlainDocument {
    private int maxLength = 9999;
    private boolean numericOnly;
    public FixedNumericDocument(int maxLength, boolean numericOnly) {
    super();
    this.maxLength = maxLength;
    this.numericOnly = numericOnly;
    //this is where we'll control all input to our document.
    //If the text that is being entered passes our criteria, then we'll just call
    //super.insertString(...)
    public void insertString(int offset, String str, AttributeSet attr) throws BadLocationException {
    if (getLength() + str.length() > maxLength) {
    return;
    else {
    try {
    if (numericOnly) {
    Integer.parseInt(str);
    //if we get here then str contains only numbers
    //so that it can be inserted
    super.insertString(offset, str, attr);
    catch(NumberFormatException exp) {
    return;
    return;

  • PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got NUMBER

    Hi all,
    Wondering if you could assist? I'm exploring User Types and having a small problem. I'm getting the above error for a user type I have created which I'm calling in a function. Here's what my code looks like which I'm running the 'scott' schema for testing purposes
    SQL> CREATE OR REPLACE TYPE NBR_COLL AS TABLE OF NUMBER;
    2 /
    Type created.
    SQL> create or replace FUNCTION first_rec_only
    2 (
    3 NUM_ID IN NUMBER
    4 ) RETURN NUMBER IS
    5 v_num NBR_COLL;
    6 BEGIN
    7 select deptno into v_num from dept;
    8 RETURN v_num(v_num.FIRST);
    9 END first_rec_only;
    10 /
    Warning: Function created with compilation errors.
    SQL> show errors
    Errors for FUNCTION FIRST_REC_ONLY:
    LINE/COL ERROR
    7/4 PL/SQL: SQL Statement ignored
    7/11 PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got
    NUMBER
    SQL>
    Any clues to what I'm doing wrong? Cheers.

    The deptno column is a number, you cannot directly select a number into your type, you need to use your type's constructor.
    Something like:
    CREATE OR REPLACE FUNCTION first_rec_only (NUM_ID IN NUMBER) RETURN NUMBER IS
       v_num NBR_COLL;
    BEGIN
       SELECT nbr_coll(deptno) INTO v_num from dept;
       RETURN v_num(v_num.FIRST);
    END first_rec_only;Note that although this will compile, it will throw ORA-01422: exact fetch returns more than requested number of rows when you run it. you need to either use the input parameter as a predicate on your query against dept, use rownum = 1 in the query or use bulk BULK COLLECT INTO, depending on what exactly you want to accomplish.
    John

Maybe you are looking for