Sqlldr with error: non-numeric character was found when numeric number

Hi,
I have been struggling with this problem for long, can't get to anywhere.
I am trying to use sqlldr to load a CSV file into table, the table looks like this :
AD_ID NUMBER(38)
CNTCT_ID VARCHAR2(60)
AD_FILE_NAME VARCHAR2(80)
AD_TITLE VARCHAR2(300)
AGCY_APRVL_DATE DATE
CORE_APRVL_DATE DATE
ENTR_CMNT CLOB
IC_APRVL_DATE DATE
PURP_TEXT CLOB
RVW_BRD_APRVL_DATE DATE
ACTIVE_FLAG VARCHAR2(1)
.......................................more fields
The control file looks like this:
LOAD DATA
INFILE "C:\ORACLE_IRTMB\IRPADS\SQL_DATA\ADS_T.CSV"
BADFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.BAD"
DISCARDFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.DSC"
truncate INTO TABLE ADS_T
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
     AD_ID INTEGER ,
     CNTCT_ID char ,
     AD_FILE_NAME char ,
     AD_TITLE char nullif (AD_TITLE=BLANKS) ,
     AGCY_APRVL_DATE DATE "MM/DD/YYYY" nullif (AGCY_APRVL_DATE=BLANKS) ,
     CORE_APRVL_DATE DATE "MM/DD/YYYY" ,
     ENTR_CMNT CHAR(7000) nullif (ENTR_CMNT=BLANKS) ,
PURP_TEXT CHAR(7000) nullif (ENTR_CMNT=BLANKS) ,
     RVW_BRD_APRVL_DATE DATE "MM/DD/YYYY" ,
     ACTIVE_FLAG char ,
     ....more fields
The Data file looks like this:
10132,simpsonl,PMSDHHStemplate.pdf,"Depression, Irritability, Mood Swings Sound Familiar?",1/13/2003,11/14/2002,,1/13/2003,"The NIMH is conducting research on premenstrual
10133,jolkovsl,10133ClozapineDHHS ver 0.pdf,Mood Swings? Unpredictable Moods? Are These Moods hard to Treat?,1/28/2003,11/14/2002,,1/28/2003,"The NIMH is conducting a study to test the efficacy of ...
--- and log file looks like this:
Record 5: Rejected - Error on table ADS_T, column RVW_BRD_APRVL_DATE.
second enclosure string not present
Record 7: Rejected - Error on table ADS_T, column RVW_BRD_APRVL_DATE.
second enclosure string not present
Record 9: Rejected - Error on table ADS_T, column RVW_BRD_APRVL_DATE.
second enclosure string not present
Record 2: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 4: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
Record 6: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected
IF I use to_date in control file:
LOAD DATA
INFILE "C:\ORACLE_IRTMB\IRPADS\SQL_DATA\ADS_T.CSV"
BADFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.BAD"
DISCARDFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.DSC"
truncate INTO TABLE ADS_T
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
     AD_ID INTEGER ,
     CNTCT_ID char ,
     AD_FILE_NAME char ,
     AD_TITLE char nullif (AD_TITLE=BLANKS) ,
     AGCY_APRVL_DATE "to_date(:AGCY_APRVL_DATE,'MM/DD/YYYY')" ,
     CORE_APRVL_DATE DATE "MM/DD/YYYY" ,
     ENTR_CMNT CHAR(7000) nullif (ENTR_CMNT=BLANKS) ,
     IC_APRVL_DATE DATE "MM/DD/YYYY" ,
     PURP_TEXT CHAR(10000) nullif (PURP_TEXT=BLANKS) ,
     RVW_BRD_APRVL_DATE DATE "MM/DD/YYYY" ,
I got extracctly same error message as above...
If I use to_char in control file:
LOAD DATA
INFILE "C:\ORACLE_IRTMB\IRPADS\SQL_DATA\ADS_T.CSV"
BADFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.BAD"
DISCARDFILE "C:\ORACLE_IRTMB\IRPADS\ADS_T.DSC"
truncate INTO TABLE ADS_T
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
     AD_ID INTEGER ,
     CNTCT_ID char ,
     AD_FILE_NAME char ,
     AD_TITLE char nullif (AD_TITLE=BLANKS) ,
     AGCY_APRVL_DATE "to_char(:AGCY_APRVL_DATE,'MMDDYYYY')" ,
Then it's said a not valid number
Record 2: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01722: invalid number
Record 4: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01722: invalid number
Record 6: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01722: invalid number
Record 8: Rejected - Error on table ADS_T, column AGCY_APRVL_DATE.
ORA-01722: invalid number
someone, please help me out here.
Thanks a lot.
Wei

hello
pls use to_date
If your session is set to default date format of DD-MON-YY, execute the following and you will receive the error message:
SQL> select to_date('20-JAN-2010', 'DD-MM-YYYY') from dual;
ERROR:
ORA-01858: a non-numeric character was found where a numeric was expected
no rows selected
When you are converting a string to a date, you have specified that the date is being passed in DD-MM-YYYY format. But you have passed the date in DD-MON-YYYY format. As the month is expected as a number by oracle, but you have passed a character, oracle is unable to translate the string to a number.
Do one of the following:
SQL> select to_date('20-JAN-2010', 'DD-MON-YYYY') from dual
2 /
TO_DATE
20-JAN-2010
OR
SQL> select to_date('20-10-2010', 'DD-MM-YYYY') from dual
2 /
TO_DATE
20-JAN-2010
or you can use alter sessin set nls_date_format='.....................';
regards

Similar Messages

  • Error while pulling data from an Oracle database. ORA-01858: a non-numeric character was found where a numeric was expected

    I'm trying to pull data from an Oracle database using SSIS. When I try to select a few fields from the source table, it returns the following error message:
        [OLE DB Source [47]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14.
        An OLE DB record is available.  Source: "OraOLEDB"  Hresult: 0x80040E14  Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
        An OLE DB record is available.  Source: "OraOLEDB"  Hresult: 0x80004005  Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
    The source columns are a combination of numeric and texts, and I've also tried selecting one of them, which didn't work. I'm using the Oracle client 11.2.0.1, and it works fine with any other data sources I have connected to so far. How can I resolve this
    error?

    Hi H.James,
    According to your description, the issue is a non-numeric character was found where a numeric was expected while pulling data from an Oracle database in SSIS.
    Based on the error message, the issue should be you are comparing a number column to a non-number column in a query. Such as the query below (ConfID is a number, Sdate is a date):
     where C.ConfID in (select C.Sdate
                       from Conference_C C
                       where C.Sdate < '1-July-12')
    Besides, a default behavior for the Oracle OleDb Provider that change the NLS Date Format of the session to 'YYYY-MM-DD HH24:MI:SS can also cause the issue. For more details about this issue, please refer to the following blog:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • ORA-01858: a non-numeric character was found where a numeric was expected

    hi ,
    This was the code which shows the sales rep invoice amount and collected amount but while running report thru concurrent program its showing the following error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    WHERE TO_CHAR ( TO_DATE ( PS.GL_DATE , 'DD/MON/YY' ) , 'MON-YYYY' ) BETWEEN TO_CHAR ( TO_DATE ( : ==> P_todate , 'YYYY/MM/DD' ) , 'MON-YYYY' ) AND TO_CHAR ( TO_DATE ( : P_todate , 'YYYY/MM/DD' ) , 'MON-YYYY' ) AND ps.customer_id = cust.custome
    The Actual Code was this
    SELECT SUBSTR(SALES.name,1,50) salesrep_name_inv,
    --ps.CLASS,
    SUM(ABS(ps.acctd_amount_due_remaining)) acctd_amt,
    SUM(ABS(ps.amount_due_remaining)) amt_due_remaining_inv,
    SUM(ABS(ps.amount_adjusted)) amount_adjusted_inv,
    SUM(ABS(ps.amount_applied)) amount_applied_inv,
    SUM(ABS(ps.amount_credited)) amount_credited_inv,
              SALES.salesrep_id,
    NULL "REMARKS"
    -- ps.gl_date gl_date_inv,
    FROM ra_cust_trx_types ctt,
    ra_customers cust,
    ar_payment_schedules ps,
    ra_salesreps SALES,
    ra_site_uses site,
    ra_addresses addr,
    ra_cust_trx_line_gl_dist gld,
    gl_code_combinations c,
    ra_customer_trx ct
    WHERE TO_CHAR(TO_DATE(PS.GL_DATE,'DD/MON/YY'),'MON-YYYY')
    BETWEEN TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY') AND TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY')
    AND ps.customer_id = cust.customer_id
    AND ps.customer_trx_id = ct.customer_trx_id
    AND ps.cust_trx_type_id = ctt.cust_trx_type_id
    AND NVL(ct.primary_salesrep_id, -3) = SALES.salesrep_id
    AND ps.customer_site_use_id+0 = site.site_use_id(+)
    AND site.address_id = addr.address_id(+)
    AND TO_CHAR(TO_DATE(PS.GL_DATE_CLOSED,'DD/MON/YY'),'MON-YYYY')
    BETWEEN TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY') AND TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY')
    --AND    ps.gl_date_closed > TO_DATE(:P_todate,'MON-YYYY')
    AND ct.customer_trx_id = gld.customer_trx_id
    AND gld.account_class = 'REC'
    AND gld.latest_rec_flag = 'Y'
    AND gld.code_combination_id = c.code_combination_id
    AND sales.salesrep_id is not null and sales.name is not null
    -- and ps.payment_schedule_id+0 < 9999
    -- AND SALES.salesrep_id ='1001'
    GROUP BY SALES.name,
    --ps.CLASS,
    SALES.salesrep_id

    So to_date function accepts a string as input and returns a date. When a date is input instead, it is implicity converted to the required type of the function paremeter, which is a string, so that to_date can convert it back to a date again.
    If you are lucky with the implicit conversion, you get the same date back, if you are not you might get a different date or an error.
    From your query it appears that this conversion from a date, to a string, to a date, and then back to a string using to_char this time, is being done to remove the time or day part of the date. The actual range comparison is being done on strings rather than dates, which is dangerous as strings sort differently than dates.
    In this example if I sort by date, Jan 01 comes between Dec 00 and Feb 01 as you would expect.
    SQL> select * from t order by d;
    D
    12-01-2000
    01-01-2001
    02-01-2001When converted to strings, Feb 01 comes between Dec 00 and Jan 01, which is probably not the desired result
    SQL> select * from t order by to_char(d,'DD-MON-YY');
    D
    12-01-2000
    02-01-2001
    01-01-2001If you want to remove time and day parts of dates you should use the trunc function
    trunc(d) removes the time, trunc(d,'mm') will remove the days to start of month.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions201.htm#i79761

  • JDBCaccess message ORA-01858: a non-numeric character was found where a num

    When trying to read a cloumn from a table using JDBC I get the above message
    Below is a copy of the code;
    Connection conn=null;
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
              System.out.println ("Driver registered"); // Print Driver Connected
              try
         {  //  <-- 1.1
              conn = DriverManager.getConnection("jdbc:oracle:thin:@***.******.**:1521:orcl", "********", "*******");
    // @machineName:port:SID, userid, password
              } // <-- 1.1
         catch (SQLException exc_1)
         {     // <-- 1.1
              //System.out.println("SQL Connect failed with: '" + exc_1.getMessage() + "'");
              exc_1.printStackTrace();
              System.exit(1);
         } //<-- 1.1
              System.out.println ("Connected - User/Password"); // Print Connected User/Password
    Statement stmt = conn.createStatement();
         System.out.println ("Instansiate SQL Statement "); // Print Instansiate
              String sql = "select BASE_CURRENCY_CODE from WH_ENT_MODEL.V_FX_DAILY_RATES ";
         try
         oracle.jdbc.driver.OracleLog.startLogging();
         PreparedStatement ps = conn.prepareStatement(sql);
         ResultSet rs = ps.executeQuery();
         oracle.jdbc.driver.OracleLog.stopLogging();
         System.out.println ("Create SQL Statement resultset "); // Print SQL Statement
    while (rs.next())
    System.out.println (rs.getString("BASE_CURRENCY_CODE")); // Print Base_Currency_Code
    stmt.close();
         catch(Exception e)
         e.printStackTrace();
                   System.exit(1);
    The error I get is;
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:153)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:930)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1131)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:983)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1257)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3467)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3512)
         at com.exchange.interfaces.dbAccess.main(dbAccess.java:69)
    This is a test class to prove we can access the database from within Java program.
    Any help much appreciated.

    Hi Deepak,
    I would first look at your session state, this should show what was passed to the procedure.
    I would suggest that if you have a select list showing a null value that that would be the issue as it passes %null% through.
    Regards
    Michael

  • 01858: a non-numeric character was found where a numeric was expected

    Hi ,
    I had ran a code
    SELECT TO_DATE (create_date,'MM/DD/YYYY HH12:MI:SS PM')
      FROM   TABLE_A
    where i got error
    -01858: a non-numeric character was found where a numeric was expected
    but later i changed to
    SELECT TO_CHAR (create_date,'MM/DD/YYYY HH12:MI:SS PM')
      FROM   TABLE_A
    which did the trick for me and i dint get any error.
    Hope this helps you.
    Documenting this for others.

    Check the NLS_DATE_FORMAT parameter value of your database.
    SELECT sysdate FROM dual; -- You can see the current format
    NLS_DATE_FORMAT specifies the default date format to use with the TO_CHAR and TO_DATE functions. The default value of this parameter is determined by NLS_TERRITORY.
    The value of this parameter can be any valid date format mask, and the value must be surrounded by double quotation marks. For example:
    NLS_DATE_FORMAT = "MM/DD/YYYY"
    From the error , I can guess your format would be 'DD-MM-YYYY', thats why when you tried to convert your date (12-AUG-2013) with (MM-DD-YYYY), you are getting the mentioned error.
    Set the NLS_DATE_FORMAT value to 'MM-DD-YYYY' as below and try.
    ALTER session SET nls_date_format='MM-DD-YYYY'

  • Non-numeric character was found where a numeric was expected

    getting the error: non-numeric character was found where a numeric was expected
    I know it's something with the variable InpMaand and InpJaar who i use in mij select statement of the cursor c_sleutel. But don't know how to fix it. Searched on the forum but no good answer found. Tnx for helping in advanced. see code below:
    CREATE OR REPLACE PROCEDURE T05_ins_f (InpJaar in number, InpMaand in number) IS
    cursor c_sleutel is
    select distinct(sleutel) as sleutel from TR_ROSETTA
    where eenheid = 'KPL'
    and to_date('01-'||(InpMaand)||'-'||(InpJaar)) between datum_van and datum_tot ;
    begin
    Message was edited by:
    user565199

    I've fit in the to_date format. but now he say's not a valid month. What i do is the following.
    InpMaand and InpJaar are both giving in by the user, like 2 and 2007
    after the to_date function, this must be the result: 01-2-2007
    otherwise: how to use the variable(InpMaand and InpJaar ) in the to_date function
    Message was edited by:
    user565199

  • A non-numeric character was found ...  iAS 8 & ora 8.1.6

    I have a problem in iAS 8 and Oracle 8.1.6 under windows 2000.
    The problem is calling nested packages using plql gateway, I
    mean I call one package and it call's another package, this
    operation throws " a non-numeric character was found where a
    numeric was expected" even if the procedure only has one
    parameter, if you call nested procedures there are no errors, I
    had the same problem on Solaris, however changed databases and
    it dissapear, I thought that the problem was some
    NLS_PARAMETERS however now I'm not pretty sure.
    Any Ideas.
    Thanks in Advance.
    Francisco Castaqeda
    Arango Software Int.

    hello
    pls use to_date
    If your session is set to default date format of DD-MON-YY, execute the following and you will receive the error message:
    SQL> select to_date('20-JAN-2010', 'DD-MM-YYYY') from dual;
    ERROR:
    ORA-01858: a non-numeric character was found where a numeric was expected
    no rows selected
    When you are converting a string to a date, you have specified that the date is being passed in DD-MM-YYYY format. But you have passed the date in DD-MON-YYYY format. As the month is expected as a number by oracle, but you have passed a character, oracle is unable to translate the string to a number.
    Do one of the following:
    SQL> select to_date('20-JAN-2010', 'DD-MON-YYYY') from dual
    2 /
    TO_DATE
    20-JAN-2010
    OR
    SQL> select to_date('20-10-2010', 'DD-MM-YYYY') from dual
    2 /
    TO_DATE
    20-JAN-2010
    or you can use alter sessin set nls_date_format='.....................';
    regards

  • Non-numeric character was found

    SELECT nvl(t1.col11,0) --into DATA
    FROM testdata t1
    WHERE (to_date(t1.col11,'DD-MM-RR') < '1-MAY-2012' OR to_date(t1.col11,'DD-MM-RR') > '31-MAY-2012')
    gives numeric character was found where a numeric was expected.
    But when I run it as a block(anonymous block) it runs fine. There are no null values in the table but may the returned value may be null which am trying to replace with NVL but then too am getting this error.
    Any suggestions?

    Hi,
    user7351276 wrote:
    SELECT nvl(t1.col11,0) --into DATA
    FROM testdata t1
    WHERE (to_date(t1.col11,'DD-MM-RR') < '1-MAY-2012' OR to_date(t1.col11,'DD-MM-RR') > '31-MAY-2012')
    gives numeric character was found where a numeric was expected.
    But when I run it as a block(anonymous block) it runs fine. There are no null values in the table but may the returned value may be null which am trying to replace with NVL but then too am getting this error.It looks like you should be getting a different error, due tounmatched single-quotes.
    Did this site garble your code? Try again. \ tags often help.  If you can't get the site to post exactly what you mean, then explain what you meant to post.
    Any suggestions?Don't compare a DATE (such as the value returned by TO_DATE) to a VARCHAR2 (such as the literal '31-MAY-2012').  Compare DATEs to other DATEs.
    You can use TO_DATE, like this:WHERE     TO_DATE (t1.col1, 'DD-MM-RR')     < TO_DATE ('01-MON-2012', 'DD-MON-YYYY')
    or a DATE literal, likE this:WHERE     TO_DATE (t1.col1, 'DD-MM-RR')     < DATE '2012-05-01'
    What you posted is definitely a mistake, but I can't tell if it's what's causing the error you mentioned or not.
    Whenever you have a question, post a copmplete test script, including CREATE TABLE and INSERT statements for some sample data, that people can run to re-create the problem and test their ideas.  Post the results you want from the given data, and explain how you get those results from that data.
    As Hoek said, read the forum FAQ {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Smartview: XML Load Error: An invalid character was found in text content.

    Hi,
    Im using hyperion 11.1.2.1 with SmartView installed with Office 2007. A lot of forms are working fine on it but we have entered data recently on a number of them and we are unable to open them in SmartView either through the icon and menu options in workspace or through the smartview panel in excel 2007. The error we are getting is "XML Load Error: An invalid character was found in text content."
    Cheers,
    Imran

    Have a look on Oracle Support - "SmartView XML Load Error: "An Invalid Character was Found in Text Content" [ID 968808.1]"
    It may be the same issue as you are experiencing.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • "XML Load error: An invalid character was found in text content" Drill Thru

    Hi,
    I am using Smart View, 2007 ms office.
    We are using EIS to have Drill Through reports.
    When I select the particular intersection and click on Hyperion --> Adhoc Analysis--> Drill Through Reports,
    Drill Through selection window is opening but when click on Launch/Execute.
    It throwing below Error
    "XML Load error: An invalid character was found in text content"
    This error is showing only some intersections...some other intersections are working fine.
    The same intersection if retrieve from ESSBASE --> Addins--> linked objects, Drill thru reports are showing fine.
    From Excel Addins everythg working fine.
    I tried in 2003 MS office from my colleague system. the same error.
    "XML Load error: An invalid character was found in text content"
    Please someone help me....!
    Regards,
    Rajendra Prasad Gella.
    Edited by: Rajendra Prasad Gella on Jun 10, 2010 4:26 AM

    This type of Issue does not happen using Excel Add-in but Smart View. We encountered it as well. I have a feeling the root cause is the ESSLANG which used to be selected during installation. If the Essbase has for instance "English Latin1" or "English US Ascii Binary" and the client does not have it, then this would occur.
    We had old SR on it because we were testin the APS 7.1.6. SR 2-603906: Excel Essbase Add-in splitting special characters such as the " ü " in. Whe we reinstalled and selected same ESSLANG as Essbase server the isue stopped.
    We did not have to chnage our code to scrub out ant special characters. !
    Jullin

  • ORA-1858: a non-numeric character was found where a numeric was expected

    Hi, I have the Function below to do an insert or update depending on situation but I get an exception each time I run my code can anyone please help me find the error in this??
    FUNCTION exceptionlog_insert_update_fn (
    v_currentmethod IN VARCHAR,
    v_customerrormessage IN VARCHAR,
    d_datelogged IN DATE,
    v_helplink IN VARCHAR,
    v_http_costcenter IN VARCHAR,
    v_http_email IN VARCHAR,
    v_http_host IN VARCHAR,
    v_http_sm_authentic IN VARCHAR,
    v_http_sm_authorized IN VARCHAR,
    v_http_sm_sdomain IN VARCHAR,
    v_http_standardid IN VARCHAR,
    v_http_user_agent IN VARCHAR,
    v_innerexception IN VARCHAR,
    n_logstatus IN NUMBER,
    v_exceptionmessage IN VARCHAR,
    v_pagepath IN VARCHAR,
    v_referrer IN VARCHAR,
    v_exceptionsource IN VARCHAR,
    v_stacktrace IN VARCHAR,
    v_squery IN VARCHAR
    RETURN NUMBER
    IS
    existingexceptionlog NUMBER;
    n_rowcount NUMBER;
    BEGIN
    SELECT exceptionlogid
    INTO existingexceptionlog
    FROM admin_exceptionlog
    WHERE pagepath = v_pagepath
    AND exceptionmessage = v_exceptionmessage
    AND referrer = v_referrer
    AND customerrormessage = v_customerrormessage;
    IF existingexceptionlog > 0
    THEN
    UPDATE admin_exceptionlog
    SET occurrences = 1
    --datelastmodified = SYSDATE
    WHERE exceptionlogid = existingexceptionlog;
    n_rowcount := SQL%ROWCOUNT;
    IF n_rowcount > 0
    THEN
    -- An Update occured RETURN O indicating this
    RETURN 0;
    END IF;
    ELSE
    ----- If It does not already exist in the DB, Do an INSERT
    -- RETRIEVE THE ID INFORMATION FIRST
    INSERT INTO admin_exceptionlog
    (exceptionlogid, currentmethod,
    customerrormessage, datelogged, helplink,
    http_costcenter, http_email, http_host,
    http_sm_authentic, http_sm_authorized,
    http_sm_sdomain, http_standardid,
    http_user_agent, innerexception, logstatus,
    exceptionmessage, pagepath, referrer,
    exceptionsource, stacktrace, squery, occurrences,
    datelastmodified
    VALUES (admin_exceptionlogid_seq.NEXTVAL, v_currentmethod,
    v_customerrormessage, d_datelogged, v_helplink,
    v_http_costcenter, v_http_email, v_http_host,
    v_http_sm_authentic, v_http_sm_authorized,
    v_http_sm_sdomain, v_http_standardid,
    v_http_user_agent, v_innerexception, n_logstatus,
    v_exceptionmessage, v_pagepath, v_referrer,
    v_exceptionsource, v_stacktrace, v_squery, 1,
    SYSDATE
    n_rowcount := SQL%ROWCOUNT;
    IF n_rowcount > 0
    THEN
    -- An Update occured RETURN O indicating this
    RETURN 0;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN 1;
    END exceptionlog_insert_update_fn;

    I do not know how to use MERGE and did not find much information on it. But I looked into modifying it and once again, it compiles in this case but when I run it using the debugger, no code is inserted into the table at all. And it exits with a row number = 0 at line
    RETURN L_rowcount;
    Is there something about running procedures on Oracle that I seem to be missing here please??? I went ahead and included information on my table as well.
    CREATE OR REPLACE FUNCTION FN_INSERT_UPDATE_EXCEPTIONLOG
    V_HELPLINK IN ADMIN_EXCEPTIONLOG.HELPLINK%TYPE,
    V_HTTP_EMAIL IN ADMIN_EXCEPTIONLOG.HTTP_EMAIL%TYPE,
    V_HTTP_HOST IN ADMIN_EXCEPTIONLOG.HTTP_HOST%TYPE,
    V_HTTP_SM_AUTHENTIC IN ADMIN_EXCEPTIONLOG.HTTP_SM_AUTHENTIC%TYPE,
    V_HTTP_COSTCENTER IN ADMIN_EXCEPTIONLOG.HTTP_COSTCENTER%TYPE,
    V_HTTP_SM_SDOMAIN IN ADMIN_EXCEPTIONLOG.HTTP_SM_SDOMAIN%TYPE,
    V_CUSTOMERRORMESSAGE IN ADMIN_EXCEPTIONLOG.CUSTOMERRORMESSAGE%TYPE,
    V_CURRENTMETHOD IN ADMIN_EXCEPTIONLOG.CURRENTMETHOD%TYPE,
    V_HTTP_SM_AUTHORIZED IN ADMIN_EXCEPTIONLOG.HTTP_SM_AUTHORIZED%TYPE,
    V_HTTP_STANDARDID IN ADMIN_EXCEPTIONLOG.HTTP_STANDARDID%TYPE,
    V_INNEREXCEPTION IN ADMIN_EXCEPTIONLOG.INNEREXCEPTION%TYPE,
    V_EXCEPTIONMESSAGE IN ADMIN_EXCEPTIONLOG.EXCEPTIONMESSAGE%TYPE,
    V_LOGSTATUS IN ADMIN_EXCEPTIONLOG.LOGSTATUS%TYPE,
    V_PAGEPATH IN ADMIN_EXCEPTIONLOG.PAGEPATH%TYPE,
    V_REFERRER IN ADMIN_EXCEPTIONLOG.REFERRER%TYPE,
    V_EXCEPTIONSOURCE IN ADMIN_EXCEPTIONLOG.EXCEPTIONSOURCE%TYPE,
    V_STACKTRACE IN ADMIN_EXCEPTIONLOG.STACKTRACE%TYPE,
    V_TARGETSITE IN ADMIN_EXCEPTIONLOG.TARGETSITE%TYPE,
    V_SQUERY IN ADMIN_EXCEPTIONLOG.SQUERY%TYPE
    ) RETURN NUMBER AS
    L_datevariable Date :=Sysdate;
    L_exceptionlogid integer :=0;
    L_rowcount number;
    BEGIN
    -- Detect any existing entries with the unique
    -- combination of columns as in this constraint:
    -- constraint WORKER_T_UK2
    -- unique (
    -- CUSTOMERRORMESSAGE,
    -- LOGSTATUS,
    -- PAGEPATH )
    begin
    select ExceptionLogID
    into L_exceptionlogid
    from ADMIN_EXCEPTIONLOG AE
    where AE.CUSTOMERRORMESSAGE = V_CUSTOMERRORMESSAGE
    AND AE.LOGSTATUS = V_LOGSTATUS
    AND AE.PAGEPATH = V_PAGEPATH;
    exception
    when NO_DATA_FOUND then
    L_exceptionlogid := 0; -- Is this really needed?
    when OTHERS then
    raise_application_error(-20003, SQLERRM||
    ' on select WORKER_T_T'||
    ' in filename insert_with_plsql_detection_for_update.sql');
    end;
    -- Conditionally insert the row
    if L_exceptionlogid is NULL then
    -- Now, let's get the next id sequence
    -- we can finally insert a row!
    begin
    insert into ADMIN_EXCEPTIONLOG (
    CURRENTMETHOD,
    CUSTOMERRORMESSAGE,
    DATELOGGED,
    HELPLINK,
    HTTP_COSTCENTER,
    HTTP_EMAIL,
    HTTP_HOST,
    HTTP_SM_AUTHENTIC,
    HTTP_SM_AUTHORIZED,
    HTTP_SM_SDOMAIN,
    HTTP_STANDARDID,
    INNEREXCEPTION,
    LOGSTATUS,
    EXCEPTIONMESSAGE,
    PAGEPATH,
    REFERRER,
    EXCEPTIONSOURCE,
    STACKTRACE,
    TARGETSITE,
    SQUERY,
    OCCURRENCES)
    values (
    V_CURRENTMETHOD,
    V_CUSTOMERRORMESSAGE,
    L_datevariable,
    V_HELPLINK,
    V_HTTP_COSTCENTER,
    V_HTTP_EMAIL,
    V_HTTP_HOST,
    V_HTTP_SM_AUTHENTIC,
    V_HTTP_SM_AUTHORIZED,
    V_HTTP_SM_SDOMAIN,
    V_HTTP_STANDARDID,
    V_INNEREXCEPTION,
    V_LOGSTATUS,
    V_EXCEPTIONMESSAGE,
    V_PAGEPATH,
    V_REFERRER,
    V_EXCEPTIONSOURCE,
    V_STACKTRACE,
    V_TARGETSITE,
    V_SQUERY, 1
    L_rowcount := sql%rowcount;
    exception
    when OTHERS then
    raise_application_error(-20006, SQLERRM||
    ' on insert WORKER_T'||
    ' in filename insert_with_plsql_detection_for_update.sql');
    end;
    else
    begin
    update ADMIN_EXCEPTIONLOG AE
    set AE.DATELOGGED = Sysdate
    , AE.OCCURRENCES = AE.OCCURRENCES + 1
    where AE.EXCEPTIONLOGID = L_exceptionlogid;
    L_rowcount := sql%rowcount;
    exception
    when OTHERS then
    raise_application_error(-20007, SQLERRM||
    ' on update WORKER_T'||
    ' in filename insert_with_plsql_detection_for_update.sql');
    end;
    end if;
    RETURN L_rowcount;
    END FN_INSERT_UPDATE_EXCEPTIONLOG;
    CREATE TABLE "SYSTEM"."ADMIN_EXCEPTIONLOG"
    (     "EXCEPTIONLOGID" NUMBER NOT NULL ENABLE,
         "CURRENTMETHOD" VARCHAR2(400 BYTE),
         "CUSTOMERRORMESSAGE" VARCHAR2(4000 BYTE),
         "DATELOGGED" DATE,
         "HELPLINK" VARCHAR2(4000 BYTE),
         "HTTP_COSTCENTER" VARCHAR2(4000 BYTE),
         "HTTP_EMAIL" VARCHAR2(4000 BYTE),
         "HTTP_HOST" VARCHAR2(4000 BYTE),
         "HTTP_SM_AUTHENTIC" VARCHAR2(4000 BYTE),
         "HTTP_SM_AUTHORIZED" VARCHAR2(4000 BYTE),
         "HTTP_SM_SDOMAIN" VARCHAR2(4000 BYTE),
         "HTTP_STANDARDID" VARCHAR2(4000 BYTE),
         "INNEREXCEPTION" VARCHAR2(4000 BYTE),
         "LOGSTATUS" NUMBER NOT NULL ENABLE,
         "EXCEPTIONMESSAGE" VARCHAR2(4000 BYTE),
         "PAGEPATH" VARCHAR2(4000 BYTE),
         "REFERRER" VARCHAR2(4000 BYTE),
         "EXCEPTIONSOURCE" VARCHAR2(4000 BYTE),
         "STACKTRACE" VARCHAR2(4000 BYTE),
         "TARGETSITE" VARCHAR2(4000 BYTE),
         "SQUERY" VARCHAR2(4000 BYTE),
         "OCCURRENCES" NUMBER,
         CONSTRAINT "ADMIN_EXCEPTIONLOG_PK" PRIMARY KEY ("EXCEPTIONLOGID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SYSTEM" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SYSTEM" ;
    CREATE OR REPLACE TRIGGER "SYSTEM"."ADMIN_EXCEPTIONLOG_TRG"
    BEFORE INSERT ON ADMIN_EXCEPTIONLOG
    FOR EACH ROW
    BEGIN
    SELECT ADMIN_EXCEPTIONLOG_EXCEPTIONLOGID_SEQ.nextVal INTO :new.EXCEPTIONLOGID FROm Dual;
    END;
    ALTER TRIGGER "SYSTEM"."ADMIN_EXCEPTIONLOG_TRG" ENABLE;

  • XML Publisher Report - Invalid character was  found in text content

    Hi Techies,
    Version Background
    Oracle apps : 11.5.10
    Oracle 9i Database
    Oracle Reports 6i
    I created a XML output type concurrent program and attached a data definition & template to it.
    My program completed with status "Warning".
    The Error is : An invalid character was found in text content.
    Then i downloaded the XML and opened it in notepad++. I found there are 2 weird characters like this ( , )
    FYI, It is a non-Ascii character so not able to paste it in this forum text field. the characters looks like double sided arrow and a forward arrow.
    I also tried loading the XML locally from RTF Template. Again it throws me same error
    Error No: -1072896760: An invalid character was found in text content.
    Additional Information:
    Data is coming from table "gl_alloc_batches.description"
    Encoding Type: UTF-8
    Please Help me how to handle such a non-ascii characters
    Edited by: 868779 on Feb 22, 2012 10:48 PM

    Hi,
    Please find below sql which will find the special characters in column of table,
    SET serveroutput ON size 1000000
    DECLARE
    PROCEDURE gooey (v_table VARCHAR2, v_column VARCHAR2)
    IS
    TYPE t_id IS TABLE OF NUMBER;
    TYPE t_dump IS TABLE OF VARCHAR2 (20000);
    TYPE t_data IS TABLE OF VARCHAR2 (20000);
    l_id t_id;
    l_data t_data;
    l_dump t_dump;
    CURSOR a
    IS
    SELECT DISTINCT column_name
    FROM dba_tab_columns
    WHERE table_name = v_table
    AND data_type = 'VARCHAR2'
    AND column_name NOT IN ('CUSTOMER_KEY', 'ADDRESS_KEY');
    BEGIN
    FOR x IN a
    LOOP
    l_id := NULL;
    l_data := NULL;
    l_dump := NULL;
    EXECUTE IMMEDIATE 'SELECT '
    || v_column
    || ', '
    || x.column_name
    || ', '
    || 'dump('
    || x.column_name
    || ')'
    || ' FROM '
    || v_table
    || ' WHERE RTRIM((LTRIM(REPLACE(TRANSLATE('
    || x.column_name
    || ',''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()_+
    -=,!\`~{}./?:";''''[ ]'',''A''), ''A'', '''')))) IS NOT NULL'
    BULK COLLECT INTO l_id, l_data, l_dump;
    IF l_id IS NOT NULL
    THEN
    FOR k IN 1 .. l_id.COUNT
    LOOP
    DBMS_OUTPUT.put_line ( v_table
    || ' - '
    || x.column_name
    || ' - '
    || TO_CHAR (l_id (k), '999999999999')
    DBMS_OUTPUT.put_line (l_data (k));
    DBMS_OUTPUT.put_line (l_dump (k));
    DBMS_OUTPUT.put_line ('*********************');
    END LOOP;
    END IF;
    END LOOP;
    END gooey;
    BEGIN
    gooey ('GL_ALLOC_BATCHES', 'DESCRIPTION');
    END;
    Thanks,
    Amogh

  • Windows Experience Index fails: An invalid character was found in text content winsat\main.cpp(1041)

    Hi
    I have been tearing my hair out over this, but found this thread which seems to be exactly what I am seeing
    (sorry for some reason I can't post links or images they have been stripped out)
    However the answer, scars me a bit and I need someone to step me through it.
    I have run SMBIOS viewer and spotted an odd looking character after the version 1 (looks like two
    small square zeros) removed it from registry but this did not solve the issue.
    ran winsat formal with admin  error. failed to load XML An invalid character was found in text content winsat\main.cpp(1041) unable to process
    xml file. winsat\main.cpp(4742) Error: cannot process assessment results cannot load xml data from string an invalid character was found in text content from interface msxm16.dll:Ixmldomdocument2
    Please help, I am tearing my hair out with this :(
    Here is my system spec, only a week old, ignore the voltages which are wrongly reported.
    Thanks
    Mike

    (Still can't post images here for some reason, can't even give you a link to see the screen shot :(
    Please verify your account in the following link
    http://social.technet.microsoft.com/Forums/en-US/947dcd6b-41c5-41c1-a39d-44a3cff60889/verify-your-account-19?forum=reportabug
    Have you tried to reset WEI as I mentioned above? What is the result?
    For HW info, we can also run msinfo32.exe to display the info.
    we can also reset BIOS to the default setting to check the issue.
    Regarding to SMBIOS, you can find detailed information in this link
    http://www.dmtf.org/standards/smbios
    NOTE
    This response contains
    a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft does not control these sites and
    has not tested any software or information found on these sites.
    Yolanda Zhu
    TechNet Community Support

  • Wddx An invalid character was found in text content

    I've this xml file:
    <wddxPacket
    version='1.0'><header/><data><array
    length='50'><struct><var
    name='CONTENTCONTAINERID'><number>11.0</number></var><var
    name='ITEMDATE'><string>03/25/2009</string></var><var
    name='TITLE'><string>Senator's sign ...AND THE REST IS NOT
    SHOWN HERE.
    I got this error message:
    An invalid character was found in text content. Error
    processing resource 'file:///Z:/publisher/logs/pu...
    Budget Proposal</string></var><var
    name='ARTICLENUM'>&l...-indent:-2em">- <struct>
    Notice the -indent -2em. That must be some special
    characters. If I'm correct, em stands for end of medium.
    My question: how can I fix this problem? The xml file shown
    above created with wddx does not allow me to change the encoding
    scheme.

    Please refer
    http://www.w3schools.com/XML/xml_encoding.asp

  • Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.

    Hi All,
    I am trying to add a new task to a Tasks list called CATasks. The list was created via Visual Studio “Add > New Item > List” process and not by custom code. The code I am using to add a task is shown below.
    What I have noticed is if I use my code to add a Task to a Task List created by Visual studio “Add > New Item > List” process, I get an error. Error message when adding an item:
    Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
    But if I create the same list using custom code I don't get an error.
    Am I missing something in my custom code or is this a bug?
    I hope you can help.
    CEStar
    App.js Code:
    function createItem() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/?$select=Title,CurrentUser/Id&$expand=CurrentUser/Id",
    type: "GET",
    dataType: "json",
    headers: {
    Accept: "application/json;odata=verbose"
    call.done(function (data, textStatus, jqXHR) {
    var userId = data.d.CurrentUser.Id;
    addItem(userId);
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function addItem(userId) {
    var due =
    new Date();
    due.setDate(due.getDate() + 7);
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/getByTitle('CATasks')/Items",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.Data.CATasksListItem" },
    Title: "Sample Task",
    AssignedToId: userId,
    DueDate: due
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var div = jQuery("#message");
    div.text("Item added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function failHandler(jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    Create List Custom Code:
    function createList() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.List" },
    BaseTemplate: SP.ListTemplateType.tasks,
    Title: "CATasks"
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var message = jQuery("#message");
    message.text("List added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thanks 
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Re: Inherited display method

    Dave You need to make an explicit call to super.Display() in the Display() method of your subclasses. Alternatively, you can delete the Display() method in your subclasses if there is no additional functionality there. You seem to be getting a bit co

  • Facebook and Twitter for Blackberry Enterprise Service (BES) 5.0.4

    We have a restriction in our organization to app world, and we are doing a POC for Facebook and Twitter apps. We want to allow users to download/access certain apps only. We plan to publish this on to the user handset thorugh BES. Can someone, tell m

  • Download to excel in allignment

    Hello Experts. we need to get the output of ME2L in a sequence when downloaded to excel . But whenever we download to excel it will come in the same way as the output displayed in the system. According to the standard it will come like PO         Ty.

  • New on Game Develop - I need a Start Point :)

    Hi, I know that this must be the topic most common, I develop applications to client/Server and I want to venture me in the development of a game (RPG). The problem is that I do not know where to start! Which are the class that I must use? Already ex

  • Itunes locking up when syncing phone

    Since upgrading to the most recent version of itunes I've had a problem trying to sync my iphone 3g. The software is utd on the phone as well. As on as I plug the phone in itunes starts up, (auto sync is turned off) and about 15 seconds later itunes