ViewCriteria with Timstamp throw ORA-01843

I try to Filter Rows by Timestap with ViewCriteria:
Env:
jdev 10.1.3
table:
create table DATE_TIMSTAMP
DATE_VALUE DATE,
TIMESTAMP_VALUE TIMESTAMP(3)
EO, VO and AM created with the wizard
EO Attribute "TimestampValue" is set to TIMSTAMP
JUnitTest:
public void testTimestampViewCriteria() {
ViewObject view = fixture1.getApplicationModule().findViewObject("DateTimstampView1");
Row row = view.createRow();
Timestamp ts = new Timestamp(System.currentTimeMillis());
row.setAttribute("TimestampValue",ts);
view.insertRow(row);
fixture1.getApplicationModule().getTransaction().postChanges();
ViewCriteria vc = view.createViewCriteria();
ViewCriteriaRow vcr = vc.createViewCriteriaRow();
vcr.setAttribute("TimestampValue",ts);
vc.add(vcr);
view.applyViewCriteria(vc);
view.executeQuery();
assertNotNull(view.hasNext());
fixture1.getApplicationModule().getTransaction().rollback();
StackTrace:
oracle.jbo.SQLStmtException: JBO-27122: SQL-Fehler bei Vorbereitung der Anweisung. Anweisung: SELECT DateTimstamp.DATE_VALUE, DateTimstamp.TIMESTAMP_VALUE, DateTimstamp.ROWID FROM DATE_TIMSTAMP DateTimstamp WHERE ( ( (DateTimstamp.TIMESTAMP_VALUE = '2006-07-27 11:08:29.776') ) )
## Detail 0 ##
java.sql.SQLException: ORA-01843: Kein gültiger Monat
uli

Oracle is smarter than you think .. ;)
Look at the filter condition, in the explain plan for your second query..
SQL> select *
  2  from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1685426719
| Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT |      |     1 |     4   (0)| 00:00:01 |
|*  1 |  FILTER          |      |       |            |          |
|   2 |   FAST DUAL      |      |     1 |     2   (0)| 00:00:01 |
|   3 |   FAST DUAL      |      |     1 |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter( EXISTS (SELECT 0 FROM "SYS"."DUAL" "DUAL"))
15 rows selected.Edited by: jeneesh on Jun 3, 2013 2:20 PM
IMO, It is correct.. That is how EXISTS works.It is supposed to check only the existence..

Similar Messages

  • XMLTable default values for timestamp results in ORA-01843: not a valid month

    When I try to provide a default for a timestamp value in the XMLTABLE function, I am greeted with an error - ORA-01843: not a valid month - no matter how I provide that default value. Whether there is a value present in the XML or not is irrelavant for this bug to occur. It appears to be an incomplete fix of bug number 9745897 (thread).
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      COLUMNS dt timestamp default sysdate) x;
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      COLUMNS dt timestamp default systimestamp) x;
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      COLUMNS dt timestamp default to_char(systimestamp, 'YYYY-MM-DD"T"HH24:MI:SS') ) x;
    Edit: A little more followup.
    This works:
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC></DOC>')
      COLUMNS dt date default sysdate) x;
    This also works, except for its just the date, and not the date/time
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC></DOC>')
      COLUMNS dt timestamp default sysdate) x;
    This doesn't work
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC></DOC>')
      COLUMNS dt timestamp default systimestamp) x;
    ORA-01861: literal does not match format string

    Hi,
    First of all, let's check the manual for the DEFAULT clause :
    XMLTABLE SQL/XML Function in Oracle XML DB
    The optional DEFAULT clause specifies the value to use when the PATH expression results in an empty sequence (or NULL). Its expr is an XQuery expression that is evaluated to produce the default value.
    According to the documentation, the DEFAULT clause should specify an XQuery expression.
    However, that is wrong, the actual implementation only expects an expression that resolves to a string, the content is not interpreted.
    So, bottom line is if we don't directly specify a string, the expression will be implicitly converted to one, and we all know how bad things can go when implicit conversions occur, especially when dates or timestamps are involved.
    Now let's focus on how the DEFAULT clause affects the query evaluation.
    When a DEFAULT clause is specified, Oracle rewrites the projection differently and do not use the native xs:dateTime format to convert the value  :
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      COLUMNS dt timestamp default systimestamp
      ) x
    becomes :
    SELECT CASE EXISTSNODE(VALUE(KOKBF$),'/DOC/DT')
             WHEN 1 THEN CAST(TO_TIMESTAMP(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/DOC/DT')),50,1,2)) AS timestamp )
             ELSE CAST(TO_TIMESTAMP(TO_CHAR(SYSTIMESTAMP(6)),'SYYYY-MM-DD"T"HH24:MI:SSXFF') AS timestamp )
           END  "DT"
    FROM TABLE("SYS"."XQSEQUENCE"(EXTRACT("SYS"."XMLTYPE"('<DOC><DT>2013-08-14T15:08:31</DT></DOC>'),'/DOC'))) "KOKBF$"
    See the red part : it doesn't use the format parameter, so the conversion relies on the session's NLS settings.
    When there's no DEFAULT clause, the TO_TIMESTAMP function uses an explicit format :
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      COLUMNS dt timestamp --default systimestamp
      ) x
    rewritten to :
    SELECT CAST(
             TO_TIMESTAMP(
               SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(VALUE(KOKBF$),'/DOC/DT'),0,0,20971520,0),50,1,2)
             , 'SYYYY-MM-DD"T"HH24:MI:SSXFF'
             AS timestamp --default systimestamp
           ) "DT"
    FROM TABLE("SYS"."XQSEQUENCE"(EXTRACT("SYS"."XMLTYPE"('<DOC><DT>2013-08-14T15:08:31</DT></DOC>'),'/DOC'))) "KOKBF$"
    so yes, maybe there's a bug here.
    Edit: A little more followup.
    This works:
    select x.*
    from
    xmltable('/DOC' passing xmltype('<DOC></DOC>')
      COLUMNS dt date default sysdate) x;
    Actually no, it doesn't work. Granted, maybe it doesn't produce any error, but the result is incorrect.
    As explained, the conversion relies on the session NLS (NLS_DATE_FORMAT in this case) :
    SQL> show parameters nls_date_format
    NAME                                 TYPE        VALUE
    nls_date_format                      string      DD/MM/RR
    SQL>
    SQL> select sysdate from dual;
    SYSDATE
    16/08/13
    SQL> select x.*
      2  from
      3  xmltable('/DOC' passing xmltype('<DOC></DOC>')
      4    COLUMNS dt date default sysdate) x;
    DT
    13/08/16
    Oracle first converts SYSDATE to a string using current NLS_DATE_FORMAT, resulting in '16/08/13'
    Then this string is converted to a DATE using the xs:date format 'YYYY-MM-DD' resulting in 13/08/0016 (August 13, 0016) which is incorrect.
    The obvious workaround to this issue is to control how Oracle implicitly converts from string to date/timestamp format :
    SQL> alter session set NLS_TIMESTAMP_FORMAT= 'YYYY-MM-DD"T"HH24:MI:SS';
    Session altered.
    SQL> select x.*
      2  from
      3  xmltable('/DOC' passing xmltype('<DOC><DT>2013-08-14T15:08:31</DT></DOC>')
      4    COLUMNS dt timestamp default systimestamp
      5    ) x;
    DT
    2013-08-14T15:08:31
    SQL> select x.*
      2  from
      3  xmltable('/DOC' passing xmltype('<DOC></DOC>')
      4    COLUMNS dt timestamp default systimestamp) x;
      COLUMNS dt timestamp default systimestamp) x
    ERROR at line 4:
    ORA-01861: literal does not match format string
    SQL> select x.*
      2  from
      3  xmltable('/DOC' passing xmltype('<DOC></DOC>')
      4    COLUMNS dt timestamp default cast(systimestamp as timestamp)) x;
    DT
    2013-08-16T12:32:58

  • Using Oracle OLE DB provider (with ADO) generates error: ORA-01843 while using date

    Were using OLE DB provider in order to connect to our Oracle 9i database. When executing the following query in a SQL Plus window I will get the correct results:
    SELECT gum_seu_syo_id, seu_userid, seu_first_name, seu_last_name
    From group_user_mapping, security_users
    Where gum_seu_syo_id = seu_syo_id
    and gum_term_date > '8/19/2002'
    and gum_seg_syo_id = 11
    However if will execute the same query from the our application (VB using ADO) I will get the following error:
    ORA-01843: Not a valid month
    Checking with our Oracle DBA we made sure my registry is correct and includes the correct format under HEKY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME,
    where the key is NLS_DATE_FORMAT (of type REG_EXPAND_SZ) with the value:
    MM/DD/YYYY HH:MI:SS AM
    I also run the following query in a SQL Plus window:
    select sysdate from dual;
    and got the following result:
    08/19/2002 10:27:20 AM
    which shows that the data format is correct.
    Trying to switch between the month and day in the query (put '19/8/2002') worked from the application but generated ORA-01843: Not a valid month in the SQL Plus window.
    Any ideas?

    try using
    to_char function
    for eg.
    select * from emp where to_char(hiredate,'dd/mm/yy') > '20/3/83'.
    Jagriti

  • M_View failed inrefresh throws error: ORA-12008/ORA-01843:not a valid month

    I am not able to refresh this matrialized view in 2 databases.Can some one help please
    ======================================================
    SQL> exec dbms_refresh.refresh('OID_SYNCH.OID_SYNCH_EMPLOYEES_HR');
    BEGIN dbms_refresh.refresh('OID_SYNCH.OID_SYNCH_EMPLOYEES_HR'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-01843: not a valid month
    ORA-02063: preceding line from HR
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457
    ORA-06512: at "SYS.DBMS_IREFRESH", line 685
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    ======================================
    DDL of Matrialized view is as:
    CREATE MATERIALIZED VIEW "OID_SYNCH"."OID_SYNCH_EMPLOYEES_HR" ORGANIZATION HEAP 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 "OID_SYNCH_D" BUILD IMMEDIATE USING INDEX REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT trunc(sysdate + 1) USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS ( select hr_person_id, hr_employee_status, hr_employee_number,hr_workbrain_id, hr_last_name, hr_first_name, hr_full_name,
    hr_known_as, hr_middle_names, hr_previous_last_name,hr_suffix, hr_email_address, hr_user_name,system_person_type, user_person_type, hr_start_date, hr_last_update_date,home_city, home_state, home_zip, home_country,home_last_update_date,position_name, job_name,work_location_code, work_location_desc,work_city, work_state, work_zip,work_country,work_last_update_date,hr_supervisor_name,hr_supervisor_id,hr_sup_last_update_date,termination_date
    from oid_synch_employees@hr )

    >
    I am not able to refresh this matrialized view in 2 databases.Can some one help please
    >
    Post the ddl for the source table.
    Also do a test. Create a table that is a clone of the MV table. Then try to do an INSERT INTO SELECT * FROM the source table into the clone table and see if you get an error.
    Don't forget to post the 4 digit Oracle versions of the source and target databases.

  • Query with error: ORA-01843: not a valid month

    Hi,
    I have a problem with a query. I have modified a query that before worked but not now!
    The correct original query was:
    SELECT  rtrim('Cambio di: '
            || (CASE WHEN nvl(A.CODICE_EMITTENTE ,' ') <> nvl(B.CODICE_EMITTENTE ,' ') THEN 'Codice emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.DESCRIZIONE_TITOLO,' ') <> nvl(B.DESCRIZIONE_TITOLO,' ') THEN 'Descrizione titolo, ' ELSE '' END)
            || (CASE WHEN nvl(A.SOTTOSTANTE,' ') <> nvl(B.SOTTOSTANTE,' ') THEN 'Sottostante, ' ELSE '' END)
            || (CASE WHEN nvl(A.TIPO_SOTTOSTANTE, ' ') <> nvl(B.TIPO_SOTTOSTANTE,' ') THEN 'Tipo sottostante, ' ELSE '' END)
            || (CASE WHEN nvl(A.CEDOLA_LORDA_CORRENTE, 0) <> nvl(B.CEDOLA_LORDA_CORRENTE, 0) THEN 'Cedola lorda corrente, ' ELSE '' END)
            || (CASE WHEN nvl(A.FREQUENZA_CEDOLA, ' ') <> nvl(B.FREQUENZA_CEDOLA, ' ') THEN 'Frequenza cedola, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') <> nvl(B.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') THEN 'Data inizio facoltà call, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') <> nvl(B.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') THEN 'Data fine facoltà call, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') <> nvl(B.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') THEN 'Data inizio facoltà put, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') <> nvl(B.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') THEN 'Data fine facoltà put, ' ELSE '' END)
            || (CASE WHEN nvl(A.AMMONTARE_EMESSO, 0) <> nvl(B.AMMONTARE_EMESSO, 0) THEN 'Ammontare emesso, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_PRIMO_GODIMENTO, '31-Dec-2999') <> nvl(B.DATA_PRIMO_GODIMENTO, '31-Dec-2999') THEN 'Data primo godimento, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_SCADENZA, '31-Dec-2999') <> nvl(B.DATA_SCADENZA, '31-Dec-2999') THEN 'Data scadenza, ' ELSE '' END)
            || (CASE WHEN nvl(A.PRIMO_PREZZO_EMISSIONE, 0) <> nvl(B.PRIMO_PREZZO_EMISSIONE, 0) THEN 'Primo prezzo di emissione, ' ELSE '' END)
            || (CASE WHEN nvl(A.MODALITA_RIMBORSO, 0) <> nvl(B.MODALITA_RIMBORSO, 0) THEN 'Modalità rimborso, ' ELSE '' END)
            || (CASE WHEN nvl(A.SUBORDINAZIONE, ' ') <> nvl(B.SUBORDINAZIONE, ' ') THEN 'Subordinazione, ' ELSE '' END)
            || (CASE WHEN nvl(A.DIV_EMIS_CODE, 0) <> nvl(B.DIV_EMIS_CODE, 0) THEN 'Codice divisa di emissione, ' ELSE '' END)
            || (CASE WHEN nvl(A.DIV_EMIS, ' ') <> nvl(B.DIV_EMIS, ' ') THEN 'Divisa di emissione, ' ELSE '' END)
            ,', ') TIPO_VARIAZIONE,
           A.ISICOD ,
           A.CODICE_EMITTENTE AS EMIT_COD_T, B.CODICE_EMITTENTE AS EMIT_COD_T1, 
           A.DESCRIZIONE_TITOLO AS DESC_TITOLO_T, B.DESCRIZIONE_TITOLO AS DESC_TITOLO_T1,
           A.SOTTOSTANTE AS SOTTOSTANTE_T, B.SOTTOSTANTE AS SOTTOSTANTE_T1,
           A.TIPO_SOTTOSTANTE AS TIPO_SOTTOSTANTE_T, B.TIPO_SOTTOSTANTE AS TIPO_SOTTOSTANTE_T1,
           A.CEDOLA_LORDA_CORRENTE AS CEDOLA_LORDA_CORRENTE_T, B.CEDOLA_LORDA_CORRENTE AS CEDOLA_LORDA_CORRENTE_T1,
           A.FREQUENZA_CEDOLA AS FREQUENZA_CEDOLA_T, B.FREQUENZA_CEDOLA AS FREQUENZA_CEDOLA_T1,
           A.DATA_INIZIO_FACOLTA_CALL AS DATA_INIZIO_FACOLTA_CALL_T, B.DATA_INIZIO_FACOLTA_CALL AS DATA_INIZIO_FACOLTA_CALL_T1,
           A.DATA_FINE_FACOLTA_CALL AS DATA_FINE_FACOLTA_CALL_T, B.DATA_FINE_FACOLTA_CALL AS DATA_FINE_FACOLTA_CALL_T1,
           A.DATA_INIZIO_FACOLTA_PUT AS DATA_INIZIO_FACOLTA_PUT_T, B.DATA_INIZIO_FACOLTA_PUT AS DATA_INIZIO_FACOLTA_PUT_T1,
           A.DATA_FINE_FACOLTA_PUT AS DATA_FINE_FACOLTA_PUT_T, B.DATA_FINE_FACOLTA_PUT AS DATA_FINE_FACOLTA_PUT_T1,
           A.AMMONTARE_EMESSO AS AMMONTARE_EMESSO_T, B.AMMONTARE_EMESSO AS AMMONTARE_EMESSO_T1,
           A.DATA_PRIMO_GODIMENTO AS DATA_PRIMO_GODIMENTO_T,  B.DATA_PRIMO_GODIMENTO AS DATA_PRIMO_GODIMENTO_T1,
           A.DATA_SCADENZA AS DATA_SCADENZA_T, B.DATA_SCADENZA AS DATA_SCADENZA_T1,
           A.PRIMO_PREZZO_EMISSIONE AS PRIMO_PREZZO_EMISSIONE_T, B.PRIMO_PREZZO_EMISSIONE AS PRIMO_PREZZO_EMISSIONE_T1,
           A.MODALITA_RIMBORSO AS MODALITA_RIMBORSO_T, B.MODALITA_RIMBORSO AS MODALITA_RIMBORSO_T1,
           A.SUBORDINAZIONE AS SUBORDINAZIONE_T, B.SUBORDINAZIONE AS SUBORDINAZIONE_T1,
           A.DIV_EMIS_CODE AS DIV_EMIS_CODE_T, B.DIV_EMIS_CODE AS DIV_EMIS_CODE_T1,
           A.DIV_EMIS AS DIV_EMIS_T, B.DIV_EMIS AS DIV_EMIS_T1,
           A.START_DATE AS DATA_AGG_T, B.START_DATE AS DATA_AGG_T1
    FROM SPR_KLERS_ISD A, SPR_KLERS_ISD B
    WHERE A.START_DATE=TRUNC(SYSDATE)
          AND A.ISICOD=B.ISICOD
          AND B.START_DATE = decode(trim(to_char(sysdate, 'Day')), 'Monday',trunc(sysdate-3), trunc(sysdate-1))
          AND (nvl(A.CODICE_EMITTENTE,' ') != nvl(B.CODICE_EMITTENTE,' ')
            OR
            nvl(A.DESCRIZIONE_TITOLO,' ') != nvl(B.DESCRIZIONE_TITOLO,' ')
            OR
            nvl(A.SOTTOSTANTE,' ') != nvl(B.SOTTOSTANTE,' ')
            OR
            nvl(A.TIPO_SOTTOSTANTE, ' ') != nvl(B.TIPO_SOTTOSTANTE,' ')
            OR
            nvl(A.CEDOLA_LORDA_CORRENTE, 0) != nvl(B.CEDOLA_LORDA_CORRENTE, 0)
            OR
            nvl(A.FREQUENZA_CEDOLA, ' ') != nvl(B.FREQUENZA_CEDOLA, ' ')
            OR
            nvl(A.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999')
            OR
            nvl(A.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_CALL, '31-Dec-2999')
            OR
            nvl(A.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999')
            OR
            nvl(A.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_PUT,'31-Dec-2999')
            OR
            nvl(A.AMMONTARE_EMESSO, 0) != nvl(B.AMMONTARE_EMESSO, 0)
            OR
            nvl(A.DATA_PRIMO_GODIMENTO, '31-Dec-2999') != nvl(B.DATA_PRIMO_GODIMENTO, '31-Dec-2999')
            OR
            nvl(A.DATA_SCADENZA, '31-Dec-2999') != nvl(B.DATA_SCADENZA, '31-Dec-2999')
            OR
            nvl(A.PRIMO_PREZZO_EMISSIONE, 0) != nvl(B.PRIMO_PREZZO_EMISSIONE, 0)
            OR
            nvl(A.MODALITA_RIMBORSO, 0) != nvl(B.MODALITA_RIMBORSO, 0)
            OR
            nvl(A.SUBORDINAZIONE, ' ') != nvl(B.SUBORDINAZIONE, ' ')
            OR
            nvl(A.DIV_EMIS_CODE, 0) != nvl(B.DIV_EMIS_CODE, 0)
            OR
            nvl(A.DIV_EMIS, ' ') != nvl(B.DIV_EMIS, ' '))The new query that not works is:
    SELECT  rtrim('Cambio di: '
            || (CASE WHEN nvl(A.CODICE_EMITTENTE ,' ') <> nvl(B.CODICE_EMITTENTE ,' ') THEN 'Codice emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.DESCRIZIONE_TITOLO,' ') <> nvl(B.DESCRIZIONE_TITOLO,' ') THEN 'Descrizione titolo, ' ELSE '' END)
            || (CASE WHEN nvl(A.SOTTOSTANTE,' ') <> nvl(B.SOTTOSTANTE,' ') THEN 'Sottostante, ' ELSE '' END)
            || (CASE WHEN nvl(A.TIPO_SOTTOSTANTE, ' ') <> nvl(B.TIPO_SOTTOSTANTE,' ') THEN 'Tipo sottostante, ' ELSE '' END)
            || (CASE WHEN nvl(A.CEDOLA_LORDA_CORRENTE, 0) <> nvl(B.CEDOLA_LORDA_CORRENTE, 0) THEN 'Cedola lorda corrente, ' ELSE '' END)
            || (CASE WHEN nvl(A.FREQUENZA_CEDOLA, ' ') <> nvl(B.FREQUENZA_CEDOLA, ' ') THEN 'Frequenza cedola, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') <> nvl(B.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') THEN 'Data inizio facoltà call, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') <> nvl(B.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') THEN 'Data fine facoltà call, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') <> nvl(B.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') THEN 'Data inizio facoltà put, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') <> nvl(B.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') THEN 'Data fine facoltà put, ' ELSE '' END)
            || (CASE WHEN nvl(A.AMMONTARE_EMESSO, 0) <> nvl(B.AMMONTARE_EMESSO, 0) THEN 'Ammontare emesso, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_PRIMO_GODIMENTO, '31-Dec-2999') <> nvl(B.DATA_PRIMO_GODIMENTO, '31-Dec-2999') THEN 'Data primo godimento, ' ELSE '' END)
            || (CASE WHEN nvl(A.DATA_SCADENZA, '31-Dec-2999') <> nvl(B.DATA_SCADENZA, '31-Dec-2999') THEN 'Data scadenza, ' ELSE '' END)
            || (CASE WHEN nvl(A.PRIMO_PREZZO_EMISSIONE, 0) <> nvl(B.PRIMO_PREZZO_EMISSIONE, 0) THEN 'Primo prezzo di emissione, ' ELSE '' END)
            || (CASE WHEN nvl(A.MODALITA_RIMBORSO, 0) <> nvl(B.MODALITA_RIMBORSO, 0) THEN 'Modalità rimborso, ' ELSE '' END)
            || (CASE WHEN nvl(A.SUBORDINAZIONE, ' ') <> nvl(B.SUBORDINAZIONE, ' ') THEN 'Subordinazione, ' ELSE '' END)
            || (CASE WHEN nvl(A.DIV_EMIS_CODE, 0) <> nvl(B.DIV_EMIS_CODE, 0) THEN 'Codice divisa di emissione, ' ELSE '' END)
            || (CASE WHEN nvl(A.DIV_EMIS, ' ') <> nvl(B.DIV_EMIS, ' ') THEN 'Divisa di emissione, ' ELSE '' END)
            ,', ') TIPO_VARIAZIONE,
           A.ISICOD ,
           A.CODICE_EMITTENTE AS EMIT_COD_T, B.CODICE_EMITTENTE AS EMIT_COD_T1, 
           A.DESCRIZIONE_TITOLO AS DESC_TITOLO_T, B.DESCRIZIONE_TITOLO AS DESC_TITOLO_T1,
           A.SOTTOSTANTE AS SOTTOSTANTE_T, B.SOTTOSTANTE AS SOTTOSTANTE_T1,
           A.TIPO_SOTTOSTANTE AS TIPO_SOTTOSTANTE_T, B.TIPO_SOTTOSTANTE AS TIPO_SOTTOSTANTE_T1,
           A.CEDOLA_LORDA_CORRENTE AS CEDOLA_LORDA_CORRENTE_T, B.CEDOLA_LORDA_CORRENTE AS CEDOLA_LORDA_CORRENTE_T1,
           A.FREQUENZA_CEDOLA AS FREQUENZA_CEDOLA_T, B.FREQUENZA_CEDOLA AS FREQUENZA_CEDOLA_T1,
           A.DATA_INIZIO_FACOLTA_CALL AS DATA_INIZIO_FACOLTA_CALL_T, B.DATA_INIZIO_FACOLTA_CALL AS DATA_INIZIO_FACOLTA_CALL_T1,
           A.DATA_FINE_FACOLTA_CALL AS DATA_FINE_FACOLTA_CALL_T, B.DATA_FINE_FACOLTA_CALL AS DATA_FINE_FACOLTA_CALL_T1,
           A.DATA_INIZIO_FACOLTA_PUT AS DATA_INIZIO_FACOLTA_PUT_T, B.DATA_INIZIO_FACOLTA_PUT AS DATA_INIZIO_FACOLTA_PUT_T1,
           A.DATA_FINE_FACOLTA_PUT AS DATA_FINE_FACOLTA_PUT_T, B.DATA_FINE_FACOLTA_PUT AS DATA_FINE_FACOLTA_PUT_T1,
           A.AMMONTARE_EMESSO AS AMMONTARE_EMESSO_T, B.AMMONTARE_EMESSO AS AMMONTARE_EMESSO_T1,
           A.DATA_PRIMO_GODIMENTO AS DATA_PRIMO_GODIMENTO_T,  B.DATA_PRIMO_GODIMENTO AS DATA_PRIMO_GODIMENTO_T1,
           A.DATA_SCADENZA AS DATA_SCADENZA_T, B.DATA_SCADENZA AS DATA_SCADENZA_T1,
           A.PRIMO_PREZZO_EMISSIONE AS PRIMO_PREZZO_EMISSIONE_T, B.PRIMO_PREZZO_EMISSIONE AS PRIMO_PREZZO_EMISSIONE_T1,
           A.MODALITA_RIMBORSO AS MODALITA_RIMBORSO_T, B.MODALITA_RIMBORSO AS MODALITA_RIMBORSO_T1,
           A.SUBORDINAZIONE AS SUBORDINAZIONE_T, B.SUBORDINAZIONE AS SUBORDINAZIONE_T1,
           A.DIV_EMIS_CODE AS DIV_EMIS_CODE_T, B.DIV_EMIS_CODE AS DIV_EMIS_CODE_T1,
           A.DIV_EMIS AS DIV_EMIS_T, B.DIV_EMIS AS DIV_EMIS_T1,
           A.START_DATE AS DATA_AGG_T, B.START_DATE AS DATA_AGG_T1
    FROM SPR_KLERS_ISD A, SPR_KLERS_ISD B
    WHERE A.START_DATE=TRUNC(SYSDATE)
          AND A.ISICOD=B.ISICOD
          AND B.END_DATE = TRUNC(SYSDATE)
          AND (nvl(A.CODICE_EMITTENTE,' ') != nvl(B.CODICE_EMITTENTE,' ')
            OR
            nvl(A.DESCRIZIONE_TITOLO,' ') != nvl(B.DESCRIZIONE_TITOLO,' ')
            OR
            nvl(A.SOTTOSTANTE,' ') != nvl(B.SOTTOSTANTE,' ')
            OR
            nvl(A.TIPO_SOTTOSTANTE, ' ') != nvl(B.TIPO_SOTTOSTANTE,' ')
            OR
            nvl(A.CEDOLA_LORDA_CORRENTE, 0) != nvl(B.CEDOLA_LORDA_CORRENTE, 0)
            OR
            nvl(A.FREQUENZA_CEDOLA, ' ') != nvl(B.FREQUENZA_CEDOLA, ' ')
            OR
            nvl(A.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999')
            OR
            nvl(A.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_CALL, '31-Dec-2999')
            OR
            nvl(A.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999')
            OR
            nvl(A.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_PUT,'31-Dec-2999')
            OR
            nvl(A.AMMONTARE_EMESSO, 0) != nvl(B.AMMONTARE_EMESSO, 0)
            OR
            nvl(A.DATA_PRIMO_GODIMENTO, '31-Dec-2999') != nvl(B.DATA_PRIMO_GODIMENTO, '31-Dec-2999')
            OR
            nvl(A.DATA_SCADENZA, '31-Dec-2999') != nvl(B.DATA_SCADENZA, '31-Dec-2999')
            OR
            nvl(A.PRIMO_PREZZO_EMISSIONE, 0) != nvl(B.PRIMO_PREZZO_EMISSIONE, 0)
            OR
            nvl(A.MODALITA_RIMBORSO, 0) != nvl(B.MODALITA_RIMBORSO, 0)
            OR
            nvl(A.SUBORDINAZIONE, ' ') != nvl(B.SUBORDINAZIONE, ' ')
            OR
            nvl(A.DIV_EMIS_CODE, 0) != nvl(B.DIV_EMIS_CODE, 0)
            OR
            nvl(A.DIV_EMIS, ' ') != nvl(B.DIV_EMIS, ' '))where I have changed only this:
    B.START_DATE = decode(trim(to_char(sysdate, 'Day')), 'Monday',trunc(sysdate-3), trunc(sysdate-1)) --------->AND B.END_DATE = TRUNC(SYSDATE)
    Both START_DATE and END_DATE are date filds.
    When I execute the second query I receive this:
    ORA-01843: not a valid monthin many ponts of the query that change every time I execute the query, why this behaviour?
    How can I solve?
    Thanks, bye bye.

    Could you execute the following query and post the output.
    select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    select sysdate from dual;Also what are the datatypes for these columns
    >
    nvl(A.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_CALL, '31-Dec-2999')
    OR
    nvl(A.DATA_FINE_FACOLTA_CALL, '31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_CALL, '31-Dec-2999')
    OR
    nvl(A.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_INIZIO_FACOLTA_PUT,'31-Dec-2999')
    OR
    nvl(A.DATA_FINE_FACOLTA_PUT,'31-Dec-2999') != nvl(B.DATA_FINE_FACOLTA_PUT,'31-Dec-2999')
    OR
    nvl(A.AMMONTARE_EMESSO, 0) != nvl(B.AMMONTARE_EMESSO, 0)
    OR
    nvl(A.DATA_PRIMO_GODIMENTO, '31-Dec-2999') != nvl(B.DATA_PRIMO_GODIMENTO, '31-Dec-2999')
    OR
    nvl(A.DATA_SCADENZA, '31-Dec-2999') != nvl(B.DATA_SCADENZA, '31-Dec-2999')
    >
    I hope you know anything given in single quotes is a string and not a date.
    Regards
    Raj

  • Throwing not a valid month error(ORA-01843)

    Hi,
    Can you please tell me whats wrong with the statement
    select Fas_Rpt_Disclose_Summ_Pkg.F_EXR_COLUMN_VALUES(3,5207773,TO_DATE('28-JUN-06','DD-MON-YY'),TO_DATE('26-Sep-06','DD-MON-YY'),TO_DATE('26-SEP-06:23:59:59','DD-MON-YY:HH24:MI:SS'),'INTRINSICVALEXR') from dual;
    Thanks

    What is the current value of NLS_DATE_LANGUAGE?
    SQL> alter session set nls_date_language='ENGLISH';
    Session altered.
    SQL> select TO_DATE('28-JUN-06','DD-MON-YY'),
      2         TO_DATE('26-Sep-06','DD-MON-YY'),
      3         TO_DATE('26-SEP-06:23:59:59','DD-MON-YY:HH24:MI:SS')
      4  from dual;
    TO_DATE(' TO_DATE(' TO_DATE('
    28-JUN-06 26-SEP-06 26-SEP-06
    SQL> alter session set nls_date_language='FRENCH';
    Session altered.
    SQL> select TO_DATE('28-JUN-06','DD-MON-YY'),
      2         TO_DATE('26-Sep-06','DD-MON-YY'),
      3         TO_DATE('26-SEP-06:23:59:59','DD-MON-YY:HH24:MI:SS')
      4  from dual;
    select TO_DATE('28-JUN-06','DD-MON-YY'),
    ERROR at line 1:
    ORA-01843: not a valid month
    SQL>

  • [PL/SQL Error] ORA-01843: not a valid month, not sure how to troubleshoot

    Trying to use PL/SQL to automatically create a report that show the following:
    Daily:      
    # of Registered Users      
    # of Completes (assessment)      Average per User
    # of Starts (assessment)      Average per User
    Weekly:      
    # of Registered Users      
    # of Completes (assessment)      Average per User
    # of Starts (assessment)      Average per User
    Yearly:      
    # of Registered Users      
    # of Completes (assessment)      Average per User
    # of Starts (assessment)      Average per User
    When I run the PL/SQL I get the following
    [error]
    ORA-01843: not a valid month
    [error]
    The error occurs on this part of the PL/SQL
    --registered users weekly starts
    select count(*), trunc(next_day(sysdate-29, 'SUNDAY')-7), trunc(sysdate-29)
         into v_weekly_count_total_ru, v_weekly_start_date, v_weekly_end_date
              from entities
                   where list_id = 3290
                   and participation_code_id = 10
                   and trunc(participation_date)
                   between trunc(next_day(sysdate-29, 'SUNDAY')-7) and                         
                            trunc(sysdate-29);I'm using the number 29 because I'm using a test database to test this first before moving it into production. And my test data only goes back to early August 2006.
    Also, I'm not doing anything with months, so I am suprised that it is throwing this type of error.
    thanks

    I tested a snippet of code in my production environment, just to see if I would get any results:
    --registered users weekly starts
    select count(*), trunc(next_day(sysdate-1, 'SUNDAY')-7), trunc(sysdate-1)
         --into v_weekly_count_total_ru, v_weekly_start_date, v_weekly_end_date
              from entities
                   where list_id = 3290
                   and participation_code_id = 10
                   and trunc(participation_date)
                   between trunc(next_day(sysdate-1, 'SUNDAY')-7) and trunc(sysdate-1);
    COUNT(*)     TRUNC(NEXT_DAY(SYSDATE-1,'SUND     TRUNC(SYSDATE-1)--INTOV_WEEKLY
    1     09/10/2006 00:00:00     09/11/2006 00:00:00I did a double check in my test DB to make sure there is data there:
    select count(*)
         from entities
              where trunc(participation_date)
              between to_date('01-08-2006','DD-MM-YYYY')
              and to_date('14-08-2006','DD-MM-YYYY')
              and list_id = 3290;
    COUNT(*)
    11So I'm pretty sure that I'm not pulling anything null.
    thanks

  • ORA-01843: not a valid month - Oracle 11gR2 vs Oracle 10gR2

    Hi,
    We have two database servers one running on 10g and another running on 11g. Application written in Java (We are using Top link to connect oracle).
    Insert query on timestamp works fine on database 10g where as same query fail on 11g and raise error ORA-01843.
    If query executed with sqlplus on database 11g it works fine. i
    INSERT INTO CAMP (CAMP_PK, TSTAMP_CREATED) VALUES (1, '2010-02-22 06:07:18.008')
    Below parameters set on DB:
    SQL> select * from nls_database_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CHARACTERSET               WE8MSWIN1252
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    NLS_RDBMS_VERSION              11.2.0.1.0
    SQL > show parameter nls_
    nls_date_format                      string      YYYYMMDD HH24:MI:SS
    nls_timestamp_format                 string      YYYY-MM-DD HH24:MI:SS.FF3
    nls_timestamp_tz_format              string      YYYYMMDD HH24:MI:SS.FF3 TZD
    Got below session data from application, both are identical.
    "11g"
         NLS_LANGUAGE=> AMERICAN
         NLS_TERRITORY=> AMERICA
         NLS_CURRENCY=> $
         NLS_ISO_CURRENCY=> AMERICA
         NLS_NUMERIC_CHARACTERS=> .,
         NLS_CALENDAR=> GREGORIAN
         NLS_DATE_FORMAT=> DD-MON-RR
         NLS_DATE_LANGUAGE=> AMERICAN
         NLS_SORT=> BINARY
         NLS_TIME_FORMAT=> HH.MI.SSXFF AM
         NLS_TIMESTAMP_FORMAT=> DD-MON-RR HH.MI.SSXFF AM
         NLS_TIME_TZ_FORMAT=> HH.MI.SSXFF AM TZR
         NLS_TIMESTAMP_TZ_FORMAT=> DD-MON-RR HH.MI.SSXFF AM TZR
         NLS_DUAL_CURRENCY=> $
         NLS_COMP=> BINARY
         NLS_LENGTH_SEMANTICS=> BYTE
         NLS_NCHAR_CONV_EXCP=> FALSE
    "10g"
         NLS_LANGUAGE=> AMERICAN
         NLS_TERRITORY=> AMERICA
         NLS_CURRENCY=> $
         NLS_ISO_CURRENCY=> AMERICA
         NLS_NUMERIC_CHARACTERS=> .,
         NLS_CALENDAR=> GREGORIAN
         NLS_DATE_FORMAT=> DD-MON-RR
         NLS_DATE_LANGUAGE=> AMERICAN
         NLS_SORT=> BINARY
         NLS_TIME_FORMAT=> HH.MI.SSXFF AM
         NLS_TIMESTAMP_FORMAT=> DD-MON-RR HH.MI.SSXFF AM
         NLS_TIME_TZ_FORMAT=> HH.MI.SSXFF AM TZR
         NLS_TIMESTAMP_TZ_FORMAT=> DD-MON-RR HH.MI.SSXFF AM TZR
         NLS_DUAL_CURRENCY=> $
         NLS_COMP=> BINARY
         NLS_LENGTH_SEMANTICS=> BYTE
         NLS_NCHAR_CONV_EXCP=> FALSE
    Does DBTIMEZONE make any impact on nls ?
    "11g"
    SQL> SELECT DBTIMEZONE, SESSIONTIMEZONE, SYSDATE FROM DUAL;
    DBTIMEZONE      SESSIONTIMEZONE                SYSTIMESTAMP
    +00:00          -05:00                         20100222 05:07:25.343
    "10g"
    SQL> SELECT DBTIMEZONE, SESSIONTIMEZONE, SYSDATE FROM DUAL;
    DBTIMEZONE      SESSIONTIMEZONE                SYSTIMESTAMP
    -05:00          -05:00                         20100222 05:07:34.771I am agree we can resolve this issue with to_timestamp but i need to defend on why it was working on 10g and not on 11g.

    A timestamp in the form '2010-02-22 06:07:18.008' should have never been accepted with NLS_TIMESTAMP_TZ_FORMAT='DD-MON-RR HH.MI.SSXFF AM TZR'. So there are three possibilities:
    1) The NLS_TIMESTAMP_TZ_FORMAT session format (NLS_SESSION_PARAMETERS) in force during the INSERT is not really the one you listed.
    2) The column CAMP.TSTAMP_CREATED is of type VARCHAR2 and not TIMESTAMP in the 10g database.
    3) There is a bug in the JDBC driver you use with 10g that allows this strange conversion.
    4) The SQL issued in the 10g database is really:
    INSERT INTO CAMP (CAMP_PK, TSTAMP_CREATED) VALUES (1, TIMESTAMP '2010-02-22 06:07:18.008')-- Sergiusz

  • Oracle error "ORA-01843: not a valid month" when trying to run sqlldr

    Hi all,
    I'm trying to load some data into a staging database via a CSV file using sqlldr, and am running into an issue where it doesn't like the date format I'm using.
    Here is my input data:
    2012-01-09 16:28:12 -05:00Here is the entry in the .ctl file:
    created TIMESTAMP WITH TIME ZONE 'yyyy-mm-dd HH24:MI:SS TZR'And finally, here is the entry in the .sql file:
    created TIMESTAMP WITH TIME ZONEAfter I try to load, I get greeted with the dreaded error message: Record 1: Rejected - Error on table WTPART, column CREATED. ORA-01843: not a valid month
    I'm really confused as to why it's blowing up on the date, because it seems to me that "01" is indeed a valid date in terms of the date format I'm using. Any ideas? Thanks!
    Edited by: Nick Tiberi on Jan 10, 2012 8:06 AM

    Hmmm, not sure exactly what the problem is. It works fine for me on my XE instance.
    Set up the control and data files....
    tubby@Tubbz:~/test$ cat >> WTPart.csv <<EOF
    2012-01-09 16:28:12 -05:00
    EOF
    tubby@Tubbz:~/test$
    tubby@Tubbz:~/test$ cat >> load.ctl <<EOF
    LOAD DATA
    INFILE WTPart.csv
    APPEND INTO TABLE WTPart
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    created TIMESTAMP WITH TIME ZONE 'yyyy-mm-dd HH24:MI:SS TZR'
    EOF
    tubby@Tubbz:~/test$
    tubby@Tubbz:~/test$ /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlldr tubby/pswd@xe control=load.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue Jan 10 10:21:28 2012
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    tubby@Tubbz:~/test$
    {code}
    Query the result from the database
    {code}
    ME_XE?select * from wtpart;
    CREATED
    09-JAN-12 04.28.12.000000 PM -05:00
    1 row selected.
    Elapsed: 00:00:00.01
    ME_XE?
    ME_XE?select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    5 rows selected.
    Elapsed: 00:00:00.01
    ME_XE?
    {code}
    Are you sure your CSV file doesn't have some "funky" data in it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

  • ORA-01843: not a valid month

    Hi
    I get the following error message intermittently.
    ===> ORA-01843: not a valid month
    The problem is only intermittent! Which makes this more difficult to solve !
    Ideas please ?
    The piece of problematic ProC code is given below -
    ===
    if(nForUpdate)
    EXEC SQL SELECT * into :dbtbl:dbind FROM MYTABLE
    WHERE my_time = :dbtbl.my_time
    AND myf_id = :dbtbl.myf_id
    AND myl_id = :dbtbl.myl_id
    AND myw_id = :dbtbl.myw_id
    FOR UPDATE;
    else
    EXEC SQL SELECT * into :dbtbl:dbind FROM MYTABLE
    WHERE my_time = :dbtbl.my_time
    AND myf_id = :dbtbl.myf_id
    AND myl_id = :dbtbl.myl_id
    AND myw_id = :dbtbl.myw_id;
    Raja

    So what kind of error handling to you have in place to log the error messages and related diagnostic information?
    This error usually happens when we have a character variable holding dates as strings, with the inevitable corruption of invalid dates being amongst those strings.
    If you say it isn't data in the table and the input parameter :dbtbl.my_time always contains a date, then the only possible explanation is that Red Lectroids are corrupting your database with their alien 8th Dimension calendar....
    Cheers, APC

  • Ora-01843 when Form is based on procedure

    I create a page using form based on procedure option. I have a date picker item in the form that corresponds to a date parameter in the procedure.
    I select every date format APEX provided from APEX date picker and always got ora-01843(not a valid month) error when I tried to sumbit the form.
    I have changed PICK_DATE_FORMAT_MASK to DD/MM/YYYY at application level but cannot solve the problem.
    Does anyone using a "Form on Procedure" and happen to have a date column? Do you have similar problem?
    ps. this problem only occurs to "Form on Procedure". I have no problem with master details or many other form options. I am using APEX 3.1.

    Hello user3003555,
    I have created forms based on procedure and used date pickers on them but don't recall encountering the date format error ORA-1843. I used "Date Picker (DD-MON-YYYY)" which corresponds to my application date format. I'm not sure what else I can tell you. Have you tried picking a date where the month and day are interchangeable to confirm that it is a formatting issue?
    - Alwyn

  • Regarding ORA-12801,ORA-01843 error

    Hi all,
    When I am running the mapping I am getting the
    ORA-12801: error signaled in parallel query server P079
    ORA-01843: not a valid month error
    My mapping was validated and deployed suceesfully.
    Please give me the suggestions.
    Thanks,
    Venkat

    Is the source field a date field or a varchar? Sounds like you are hitting a source data error.
    Try grabbing the insert (or merge, or whatever) statement from the mapping and running it on its own. If that fails with the same error, then try running the select portion of the statement to debug for the error.
    Assuming that you are using a to_Date function and if you are having real trouble finding the data error, you at least know which table the field is being sourced from. Run a little test - something like:
    declare
      cursor curs is select the_source_field from the_source_table;
    begin
      for rec in curs loop
         declare
            dateval date
         begin
            dateval := to_Date(rec.the_source_field,'yyyymmdd');   --or whatever format mask it is you are using
         exception
             when others then
                 dbms_output.put_line('FAILED TO_DATE ON SOURCEVAL: '||rec.the_source_field||' with error: '||substr(sqlerrm,1,150));
         end;
      end loop;
    end;Once you know the problems with the data then you can consider how best to deal with them.
    Cheers,
    Mike

  • JBO-27122: SQL error & java.sql.SQLException: ORA-01843: not a valid month

    Hi,
    We developed OA page for Employee's Payslip and it is working fine for all the employees but it is not working for only one employee...Getting the error as
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement
    preparation
    ## Detail 0 ##
    java.sql.SQLException: ORA-01843: not a valid month
    Real Scenario is:
    The user "DANISH.LOTFY" is login into application and when he click on Payslip to the month then he is always getting the above error.
    For testing purpose we have removed his employee assignment from user screen(fnd_user) and assigned some other employee name (say MOHAMED.ELBAHY)... After this when DANISH.LOTFY logins into the application and payslip page is working fine...(He can able to see MOHAMED.ELBAHY payslip.....
    Realy we don't know this strange behaviour of OA ...
    ------ Code with Error details------------------
    Statement:
    SELECT * FROM (SELECT DISTINCT ppa.DATE_EARNED, TO_CHAR(ppa.DATE_EARNED,'MON-YYYY') DISPLAY
    , TO_CHAR(ppa.DATE_EARNED,'MM YYYY') PARAM
    FROM
    pay_payroll_actions ppa
    ,pay_assignment_actions pac
    ,PER_ALL_ASSIGNMENTS_F PASS
    ,FND_USER FU
    ,per_time_periods PTP
    WHERE ppa.payroll_id = 61
    AND ppa.payroll_action_id = pac.payroll_action_id
    AND PAC.ASSIGNMENT_ID = PASS.ASSIGNMENT_ID
    AND PASS.PERSON_ID = FU.EMPLOYEE_ID
    AND FU.USER_ID =Fnd_Profile.VALUE('USER_ID')
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) IS NOT NULL
    ---Added by Sudipta C on 28th Janaury 2008
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) <> TRIM(TO_CHAR(SYSDATE,'MON-YYYY'))
    AND ppa.DATE_EARNED=(SELECT MAX(DATE_EARNED) FROM pay_payroll_actions WHERE time_period_id=ppa.time_period_id)
    AND ppa.DATE_EARNED >='30-NOV-2007'
    UNION ALL
    --Query to Display only the Current Month if the Concurrent Request Ran
    SELECT DISTINCT ppa.DATE_EARNED, TO_CHAR(ppa.DATE_EARNED,'MON-YYYY') DISPLAY
    , TO_CHAR(ppa.DATE_EARNED,'MM YYYY') PARAM
    FROM
    pay_payroll_actions ppa
    ,pay_assignment_actions pac
    ,PER_ALL_ASSIGNMENTS_F PASS
    ,FND_USER FU
    ,per_time_periods PTP
    WHERE ppa.payroll_id = 61
    AND ppa.payroll_action_id = pac.payroll_action_id
    AND PAC.ASSIGNMENT_ID = PASS.ASSIGNMENT_ID
    AND PASS.PERSON_ID = FU.EMPLOYEE_ID
    AND FU.USER_ID = Fnd_Profile.VALUE('USER_ID')
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) IS NOT NULL
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) = TRIM(TO_CHAR(SYSDATE,'MON-YYYY'))
    AND ppa.DATE_EARNED=(SELECT MAX(DATE_EARNED) FROM pay_payroll_actions WHERE time_period_id=ppa.time_period_id)
    AND ppa.DATE_EARNED >='30-NOV-2007'
    --Check the Concurrent Program Ran or not to Display the SYS Month Payroll Period ID
    AND EXISTS
    (SELECT TRIM(TO_CHAR(REQUEST_DATE,'MON-YYYY')) FROM fnd_conc_req_summary_v fcrs
    WHERE program_short_name = 'PROC_EXP1_TESTING'
    AND PHASE_CODE='C' AND STATUS_CODE='C'
    AND TO_CHAR(REQUEST_DATE,'MON-YYYY')=TO_CHAR(SYSDATE,'MON-YYYY')
    AND REQUEST_DATE=(SELECT MAX(REQUEST_DATE) FROM fnd_conc_req_summary_v
    WHERE CONCURRENT_PROGRAM_ID=fcrs.CONCURRENT_PROGRAM_ID))
    ORDER BY 1 DESC) QRSLT WHERE (( UPPER(DISPLAY) like :1 AND (DISPLAY like :2 OR DISPLAY like :3 OR DISPLAY like :4 OR DISPLAY like :5)))
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormData(OAPageBean.java:2555)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1677)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
         at oa_html._OA._jspService(_OA.java:84)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01843: not a valid month
    Could any please suggest/provide your valuable inputs to resolve this issue(It is in production , so please treat it as very urgent).
    Thanks & Regards,
    J.Prakash

    Hi,
    This is really a strange behaviour as you are saying that it is happening only for one user so please check his user preferences.
    Regards,
    Reetesh Sharma

  • The database error text is: ORA-01843: not a valid month

    I am trying to use a date field as a query filter and I keep getting the
    following error:
    A database error occurred. The database error text is: ORA-01843: not a
    valid month. (WIS 10901).
    When I remove the query filter and run the query it works as
    expected. I want to be able to allow the users to use the date field in order
    to select a date range. Can someone provide me with some information on how to
    resolve this issue.

    SQL> SELECT (to_char(tO_date('09/29/2006', 'mm/dd/yyyy'))||':'||TO_CHAR(systimestamp,'hh24:mi:ss:ff6'))
      2  FROM dual;
    (TO_CHAR(TO_DATE('09/29/2006
    29-SEP-06:01:33:09:023000
    But you want mm/dd/yyyy hh24:mi:ss:ff6 format then use TO_CHAR function for format specifier
    SQL> SELECT to_char(to_timestamp((to_char(tO_date('09/29/2006', 'mm/dd/yyyy'))||':'||TO_CHAR(systimestamp,'hh24:mi:ss:ff6')), 'dd/mm/yyyy hh24:mi:ss:ff6'),'mm/dd/yyyy hh24:mi:ss:ff6')
      2  FROM DUAL
      3  /
    TO_CHAR(TO_TIMESTAMP((TO_CHAR
    09/29/0006 01:40:27:113000
    SQL> Khurram

Maybe you are looking for

  • Help adding new files to Jar file.

    I am new to Java and am having problems haveing our Web App work after I have recreated the JAR file...this is what I did... Changed to the following directory at a dos prompt: D:\jdk1.3.1_01\bin Ran the following to extract the files from the jar fi

  • P67A-GD65 No BIOS/boot with DisplayPort

    Hi, Just replaced Asus P8P67 Deluxe with this board, as the Asus suffered from random power downs. Turns out, this board did exactly the same as I was typing this. That problem aside (added more vcore), this board will not even boot into the BIOS (v1

  • Error 1335 when trying to install Reader 9.3.4 on fresh xp installation

    Hi, I keep getting an Error 1335 The Cabinet file Data1.cab required for this installation is corrupt etc.  Im trying to install on XP SP3 with a fresh installation of xp.  I've tried Firefox and IE8 with the Adobe download manager and I've also trie

  • FM for Internal Condition record MEK1/MEK2 and VK11/VK12

    Hi, Is there any function module to update the internal condition record for both Purchasing(MEK2) as well as SD condition records(VK12). My requirement is to update the price and price unit in the gross price condition(PB00) and sales price conditio

  • How to create fourier transform properties using labview

    Hi everyone i am a new user to Labview and i only have 2 weeks left to complete an assignment. This assignment involves the implementation of the various types of fourier transform properties using Labview. These properties include linearity, time sh