ORA-01858 on TOAD

Hi all


When running this Toad sqlplus query, it works fine... but when am with toad is a failure with

ORA-01858: a non-digit character was found here where was waiting for a digital


SELECT TRUNC(TRANSDATE) , CALLEDHOMECODE DESTINATION,
(SELECT DESTINATION_DESC FROM dbm.DBM_DESTINATION WHERE DESTINATION_CODE =A.CALLEDHOMECODE AND ROWNUM <2) country,
CALLTYPE,COUNT( DISTINCT SUBNO) NOOFSUB,COUNT(*) NOOFCALLS,SUM(CALLDURATION) ACT_DURATION,SUM(BILLAMOUNT)  FROM TABSBGR.ROAMING_PREP_CALLS A
where calltype in ('001','031')
AND  TRANSDATE BETWEEN TO_DATE('17-OCTOBER-2009 000000','DD-MM-YYYY HH24MISS') AND TO_DATE('23-OCTOBER-2009 235959','DD-MM-YYYY HH24MISS')
AND CALLEDHOMECODE <> '965'
AND TRUNC((length(trim(b_subno))+7)/8)<>1
AND ROWID IN
(SELECT MIN(ROWID) FROM TABSBGR.ROAMING_PREP_CALLS WHERE CALLTYPE IN ('001','031')
GROUP BY TRANSDATE, SUBNO, B_SUBNO, CHARGINGTIME, CALLTYPE, CHARGINGTYPE, CALLDURATION, BILLAMOUNT, PREBALANCE, POSTBALANCE, CHARGINGPARTYNO)
GROUP BY  TRUNC(TRANSDATE),CALLEDHOMECODE,CALLTYPE;
Any idea?


Kai

Hello

The date and the format mask does not match.

AND  TRANSDATE BETWEEN TO_DATE('17-OCTOBER-2009 000000','DD-MM-YYYY HH24MISS') AND TO_DATE('23-OCTOBER-2009 235959','DD-MM-YYYY HH24MISS')

You use the month completely ("OCTOBER"), but the format is given in the form "MM".
Change the above to

AND  TRANSDATE BETWEEN TO_DATE('17-OCTOBER-2009 000000','DD-MONTH-YYYY HH24MISS')
                                   AND TO_DATE('23-OCTOBER-2009 235959','DD-MONTH-YYYY HH24MISS')

Arun-

Tags: Database

Similar Questions

  • Data load rule for BefImport script getting failed due to the error Code ORA-01858

    Hello guys,.

    I'm trying to load some data from the views created in EBS to HFM using FDMEE with the help of the BefImport Script. To do this, I wrote script below:

    _________________________________________________________________________________________________________________________________________________

    import java.sql SQL

    import sys

    batchName = "Batch_" + str (fdmContext ["LOCNAME"])

    insertStmt = «»

    stmtRS = «»

    If (fdmContext ["LOCNAME"] is "LOC_OIA_FA_CORP1"):

    "insertStmt = '"

    INSERT INTO AIF_OPEN_INTERFACE)

    BATCH_NAME

    YEAR

    PERIOD

    PERIOD_NUM

    CURRENCY

    COL04

    COL05

    COL07

    COL08

    COL09

    COL10

    COL11

    QUANTITY

    ) (VALUES

    ?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    ,?

    )

    """

    sourceConn = sql. DriverManager.getConnection ("jdbc:oracle:thin:@ebsr12dbcnvgl.abc.com:1541:avc", "pppp", "nnnnn");

    # Limiting the number of rows to 5 during the test runs.

    selectStmt = 'SELECT TEMP_VIEW. PERIOD_YEAR, TEMP_VIEW. PERIOD_NAME, TEMP_VIEW. PERIOD_NUM, TEMP_VIEW. CURRENCY_CODE, TEMP_VIEW. SEGMENT1, TEMP_VIEW. SEGMENT2, CONCAT (TEMP_VIEW. SEGMENT3, TEMP_VIEW. "SEGMENT4) AS SEGMENTX, TEMP_VIEW.SEGMENT5, TEMP_VIEW.SEGMENT6, TEMP_VIEW.SEGMENT7, TEMP_VIEW.SEGMENT8, TEMP_VIEW.NETBAL FROM TEMP_VIEW WHERE THE QUAD IS NOT NULL.

    stmt = sourceConn.prepareStatement (selectStmt)

    stmtRS = stmt.executeQuery)

    batchName = "Batch_" + str (fdmContext ["LOCNAME"])

    While (stmtRS.Next ()):

    params = [batchName, stmtRS.getString("PERIOD_YEAR"),

    stmtRS.getString ("PERIOD_NAME"),

    stmtRS.getString ("PERIOD_NUM"),

    stmtRS.getString ("CURRENCY_CODE"),

    stmtRS.getString ("SEGMENT1"),

    stmtRS.getString ("SEGMENT2"),

    stmtRS.getString ("SEGMENTX"),

    stmtRS.getString ("SEGMENT5"),

    stmtRS.getString ("SEGMENT6"),

    stmtRS.getString ("SEGMENT7"),

    stmtRS.getString ("SEGMENT8"),

    stmtRS.getBigDecimal ("NETBAL")]

    fdmAPI.executeDML (insertStmt, params, False)

    fdmAPI.commitTransaction)

    stmtRS.close)

    stmt. Close()

    sourceConn.close)

    _________________________________________________________________________________________________________________________________________________

    But my DLR gets failed. When I checked the ODI journal for this, I found that it is said: stmtRS = stmt.executeQuery () and display and error code problem:

    java.sql.SQLDataException: java.sql.SQLDataException: ORA - 01858: a nonnumeric character where waiting a digital.

    What is the problem? Kindly help.

    Thank you

    Concerning

    Nishant

    Nishant

    small Question... What version you use.  the latest Patch is now universal data adapter that allows for a direct import of the tables and views without the need to use the Interface open to scene data table

    If you're not on current patch.100 then you should look at the data types for the OpenInterface table... you can see the number.  I guess it's the column YEAR or PERIOD_NUM giving you seizures

    If you run your code in Eclipse before you deploy I'd print our your insertStmt SQL and then try to run in SQLDeveloper.

    Hope this helps

    Wayne

  • ORA-01858: a non-digit character was found here where was waiting for a digital

    Hi friends,

    Before posting inturn I have goggled on the question above, but looking forward for you suggestions.

    I have the data in the table that consist of two columns of date below

    Date Validation.PNG

    when im trying to like

    TO_NUMBER (ROUND (MONTHS_BETWEEN (TO_DATE (C22_LASTPAYDUEDATE, "YYYY-MM-DD HH24:MI:SS), TO_DATE (C23_FACGRANTDATE," YYYY-MM-DD HH24:MI:SS)))))))

    Like the im getting the error ORA-01858: a non-digit character was found here where was waiting for a digital. How to solve this question friends.

    Thanks in advance.

    Kind regards

    Saro

    If C22_FACGRANTDATE and C23_LASTPAYDUEDATE are indeed 'two date columns', why are you doing a TO_DATE() on them? And why do you do a TO_NUMBER() to a value that will already be a number? Why not just do this:

    ROUND (MONTHS_BETWEEN (C22_LASTPAYDUEDATE, C23_FACGRANTDATE))

    If they are not the columns date (i.e. the DATE or TIMESTAMP data type columns), why are they not?

  • ORA-01858

    I am trying to create a partition of the range and getting ORA-01858: a non-digit character was found here where was waiting for a digital

    SQL > create table range (order_date date) partition by range (order_date) (partition p1 values less than (to_date('01-JAN-2011','DD-MM-YYYY')));


    ERROR on line 1:
    ORA-01858: a non-digit character was found here where was waiting for a digital

    I've changed my session and changed NLS_DATE_FORMAT = DD-MON-YYYY HH24:MI:SS

    Any suggestions how to fix it?

    You insert "JAN" like months but the to_date wait the number of months, you need to change or modify "MM".
    create the table range (order_date date) partition by range (order_date) (partition p1 values less than (to_date('01-JAN-2011','DD-MM-YYYY')));

    Fix will be:

    create the table range (order_date date) partition by range (order_date) (partition p1 values less than (to_date('01-01-2011','DD-MM-YYYY')));

  • PLSQL procedure with the ORA-01858: a non-digit character was found where

    Hi friends,
    I'm pretty much back to the plsql programming. I am creating the plsql procedure that basically accepts the values of variables and controls difference of two columns if she's even if different it inserts values into the temporary table GTT_S_DOC_QUOTE, and then inserts data into another table in s_doc_quote please help me or correct my procedure.
    Since I'm getting below error ORA-01858: a non-digit character was found here where waiting a digital .my procedure is as below.
    CREATE OR REPLACE PROCEDURE QUOTE_STS)

    ROW_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. ROW_ID % TYPE,
    STAT_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. STAT_CD % TYPE,
    PREV_STS_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. PREV_STS_CD % TYPE,
    BU_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. BU_ID % TYPE,
    CREATED_IN GGATE_CT. GTT_S_DOC_QUOTE. CREATED % TYPE,
    X_CRRNT_TOT_AGRD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_AGRD_RMS % TYPE,
    X_CRRNT_TOT_BLCKD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_RMS % TYPE,
    X_CRRNT_TOT_PCKDUP_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_RMS % TYPE,
    X_CRRNT_TOT_PCKDUP_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_AVGRT % TYPE,
    X_CRRNT_TOT_BLCKD_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_AVGRT % TYPE,
    X_CRRNT_CNTRCT_SR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_SR_REVN % TYPE,
    X_CRRNT_CNTRCT_FD_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_FD_REVN % TYPE,
    X_CRRNT_CNTRCT_BEV_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_BEV_REVN % TYPE,
    X_CRRNT_CNTRCT_RM_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RM_REVN % TYPE,
    X_CRRNT_USD_EXCHNG_RT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_USD_EXCHNG_RT % TYPE,
    X_CRRNT_CNTRCT_OTHR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_OTHR_REVN % TYPE,
    X_CRRNT_CNTRCT_RSRC_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RSRC_REVN % TYPE,
    LAST_UPD_IN GGATE_CT. GTT_S_DOC_QUOTE. LAST_UPD % TYPE)

    BEGIN

    IF (PREV_STS_CD == STAT_CD) then
    END if;
    INSERT INTO GTT_S_DOC_QUOTE)
    ROW_ID,
    STAT_CD,
    PREV_STS_CD,
    BU_ID,
    CREATED,
    X_CRRNT_TOT_AGRD_RMS,
    X_CRRNT_TOT_BLCKD_RMS,
    X_CRRNT_TOT_PCKDUP_RMS,
    X_CRRNT_TOT_PCKDUP_AVGRT,
    X_CRRNT_TOT_BLCKD_AVGRT,
    X_CRRNT_CNTRCT_SR_REVN,
    X_CRRNT_CNTRCT_FD_REVN,
    X_CRRNT_CNTRCT_BEV_REVN,
    X_CRRNT_CNTRCT_RM_REVN,
    X_CRRNT_USD_EXCHNG_RT,
    X_CRRNT_CNTRCT_OTHR_REVN,
    X_CRRNT_CNTRCT_RSRC_REVN,
    LAST_UPD
    )
    VALUES ('ROW_ID_IN',
    "STAT_CD_IN,"
    "PREV_STS_CD_IN,"
    "BU_ID_IN,"
    "CREATED_IN,"
    "X_CRRNT_TOT_AGRD_RMS_IN,"
    "X_CRRNT_TOT_BLCKD_RMS_IN,"
    "X_CRRNT_TOT_PCKDUP_RMS_IN,"
    "X_CRRNT_TOT_PCKDUP_AVGRT_IN,"
    "X_CRRNT_TOT_BLCKD_AVGRT_IN,"
    "X_CRRNT_CNTRCT_SR_REVN_IN,"
    "X_CRRNT_CNTRCT_FD_REVN_IN,"
    "X_CRRNT_CNTRCT_BEV_REVN_IN,"
    "X_CRRNT_CNTRCT_RM_REVN_IN,"
    "X_CRRNT_USD_EXCHNG_RT_IN,"
    "X_CRRNT_CNTRCT_OTHR_REVN_IN,"
    "X_CRRNT_CNTRCT_RSRC_REVN_IN,"
    'LAST_UPD '.
    );

    INSERT INTO S_DOC_QUOTE_CT
    (ROW_ID_OUT, STAT_CD_OUT, PREV_STS_CD_OUT, BU_ID_OUT, CREATED_OUT, X_CRRNT_TOT_AGRD_RMS_OUT, X_CRRNT_TOT_BLCKD_RMS_OUT, X_CRRNT_TOT_PCKDUP_RMS_OUT, X_CRRNT_TOT_PCKDUP_AVGRT_OUT,
    X_CRRNT_TOT_BLCKD_AVGRT_OUT, X_CRRNT_CNTRCT_SR_REVN_OUT, X_CRRNT_CNTRCT_FD_REVN_OUT, X_CRRNT_CNTRCT_BEV_REVN_OUT, X_CRRNT_CNTRCT_RM_REVN_OUT, X_CRRNT_USD_EXCHNG_RT_OUT, X_CRRNT_CNTRCT_OTHR_REVN_OUT,
    SELECT X_CRRNT_CNTRCT_RSRC_REVN_OUT ROW_ID), STAT_CD, PREV_STS_CD, BU_ID, CREATED, X_CRRNT_TOT_AGRD_RMS, X_CRRNT_TOT_BLCKD_RMS, X_CRRNT_TOT_PCKDUP_RMS, X_CRRNT_TOT_PCKDUP_AVGRT,.
    X_CRRNT_TOT_BLCKD_AVGRT, X_CRRNT_CNTRCT_SR_REVN, X_CRRNT_CNTRCT_FD_REVN, X_CRRNT_CNTRCT_BEV_REVN, X_CRRNT_CNTRCT_RM_REVN, X_CRRNT_USD_EXCHNG_RT, X_CRRNT_CNTRCT_OTHR_REVN,
    GGATE_CT X_CRRNT_CNTRCT_RSRC_REVN. GTT_S_DOC_QUOTE;

    COMMIT;
    end if;
    end QUOTE_STS;

    I was wondering why I get this error even if I stated the PREV_STS_CD

    What line do you think that you said PREV_STS_ID on? As far as I can see that the IF statement is the first mention of it in your code. My guess is that you mean PREV_STATS_ID_IN (goes the same for STAT_CD / STAT_CD_IN).

    If you write

    IF prev_sts_cd_in = stat_cd_in
    THEN
       NULL;
    END IF;
    
    do_something_here;
    

    then "do_something_here" will be processed regardless of the IF condition. I think what you probably wanted was something like

    IF prev_sts_cd_in = stat_cd_in
    THEN
       NULL;
    ELSE
       do_something_here;
    END IF;
    

    Is it possible for the prev_sts_cd and the stat_cd null? The test above would not handle this.

    Also, as others have mentioned, the first INSERT statement attempts to insert the strings like "ROW_ID_IN" you probably want to use the value of the ROW_ID_IN parameter, which is the reason why you get the error ORA-01858. I'm guessing here of course, but I took out the quotes.

    That would make your code something like this:

    CREATE OR REPLACE PROCEDURE quote_sts
        ( row_id_in                    ggate_ct.gtt_s_doc_quote.row_id%TYPE
        , stat_cd_in                   ggate_ct.gtt_s_doc_quote.stat_cd%TYPE
        , prev_sts_cd_in               ggate_ct.gtt_s_doc_quote.prev_sts_cd%TYPE
        , bu_id_in                     ggate_ct.gtt_s_doc_quote.bu_id%TYPE
        , created_in                   ggate_ct.gtt_s_doc_quote.created%TYPE
        , x_crrnt_tot_agrd_rms_in      ggate_ct.gtt_s_doc_quote.x_crrnt_tot_agrd_rms%TYPE
        , x_crrnt_tot_blckd_rms_in     ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_rms%TYPE
        , x_crrnt_tot_pckdup_rms_in    ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_rms%TYPE
        , x_crrnt_tot_pckdup_avgrt_in  ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_avgrt%TYPE
        , x_crrnt_tot_blckd_avgrt_in   ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_avgrt%TYPE
        , x_crrnt_cntrct_sr_revn_in    ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_sr_revn%TYPE
        , x_crrnt_cntrct_fd_revn_in    ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_fd_revn%TYPE
        , x_crrnt_cntrct_bev_revn_in   ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_bev_revn%TYPE
        , x_crrnt_cntrct_rm_revn_in    ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rm_revn%TYPE
        , x_crrnt_usd_exchng_rt_in     ggate_ct.gtt_s_doc_quote.x_crrnt_usd_exchng_rt%TYPE
        , x_crrnt_cntrct_othr_revn_in  ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_othr_revn%TYPE
        , x_crrnt_cntrct_rsrc_revn_in  ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rsrc_revn%TYPE
        , last_upd_in                  ggate_ct.gtt_s_doc_quote.last_upd%TYPE )
    IS
    BEGIN
        IF prev_sts_cd_in = stat_cd_in
        THEN
            NULL;
        ELSE
            INSERT INTO gtt_s_doc_quote
                 ( row_id
                 , stat_cd
                 , prev_sts_cd
                 , bu_id
                 , created
                 , x_crrnt_tot_agrd_rms
                 , x_crrnt_tot_blckd_rms
                 , x_crrnt_tot_pckdup_rms
                 , x_crrnt_tot_pckdup_avgrt
                 , x_crrnt_tot_blckd_avgrt
                 , x_crrnt_cntrct_sr_revn
                 , x_crrnt_cntrct_fd_revn
                 , x_crrnt_cntrct_bev_revn
                 , x_crrnt_cntrct_rm_revn
                 , x_crrnt_usd_exchng_rt
                 , x_crrnt_cntrct_othr_revn
                 , x_crrnt_cntrct_rsrc_revn
                 , last_upd )
            VALUES
                 ( row_id_in
                 , stat_cd_in
                 , prev_sts_cd_in
                 , bu_id_in
                 , created_in
                 , x_crrnt_tot_agrd_rms_in
                 , x_crrnt_tot_blckd_rms_in
                 , x_crrnt_tot_pckdup_rms_in
                 , x_crrnt_tot_pckdup_avgrt_in
                 , x_crrnt_tot_blckd_avgrt_in
                 , x_crrnt_cntrct_sr_revn_in
                 , x_crrnt_cntrct_fd_revn_in
                 , x_crrnt_cntrct_bev_revn_in
                 , x_crrnt_cntrct_rm_revn_in
                 , x_crrnt_usd_exchng_rt_in
                 , x_crrnt_cntrct_othr_revn_in
                 , x_crrnt_cntrct_rsrc_revn_in
                 , last_upd );
    
            INSERT INTO s_doc_quote_ct
                 ( row_id
                 , stat_cd
                 , prev_sts_cd
                 , bu_id
                 , created
                 , x_crrnt_tot_agrd_rms
                 , x_crrnt_tot_blckd_rms
                 , x_crrnt_tot_pckdup_rms
                 , x_crrnt_tot_pckdup_avgrt
                 , x_crrnt_tot_blckd_avgrt
                 , x_crrnt_cntrct_sr_revn
                 , x_crrnt_cntrct_fd_revn
                 , x_crrnt_cntrct_bev_revn
                 , x_crrnt_cntrct_rm_revn
                 , x_crrnt_usd_exchng_rt
                 , x_crrnt_cntrct_othr_revn
                 , x_crrnt_cntrct_rsrc_revn
                 , last_upd)
            SELECT row_id
                 , stat_cd
                 , prev_sts_cd
                 , bu_id
                 , created
                 , x_crrnt_tot_agrd_rms
                 , x_crrnt_tot_blckd_rms
                 , x_crrnt_tot_pckdup_rms
                 , x_crrnt_tot_pckdup_avgrt
                 , x_crrnt_tot_blckd_avgrt
                 , x_crrnt_cntrct_sr_revn
                 , x_crrnt_cntrct_fd_revn
                 , x_crrnt_cntrct_bev_revn
                 , x_crrnt_cntrct_rm_revn
                 , x_crrnt_usd_exchng_rt
                 , x_crrnt_cntrct_othr_revn
                 , x_crrnt_cntrct_rsrc_revn
                 , last_upd
            FROM   ggate_ct.gtt_s_doc_quote;
    
        END IF;
    END quote_sts;
    
  • Error ORA - 01858 Apex report working / valid underlying the request

    After two days of searching for these forums and AskTom, I think I need to put the following problem.

    I have what seems to be a valid view of certain data that is created as follows (with apologies for the formatting - doesn't seem to be a way to use a fixed font here):

    CREATE OR REPLACE VIEW "PRICING_CAPABILITY" OF THE FORCE. "" POW_EXEC_SUMM010 "("Item",
    "Jul-09", "Aug-09", "Ms-09", "Oct-09", "Nov-09", "Dec-09", "Jan-10", "" "" "
    'Feb-10', '10-Mar', 'Apr-10', '10-may', 'Jun-10', 'CDA')
    AS
    SELECT
    "Item."
    Sum (decode("ItemMonth",'Jul-09',"ItemValue",0)) "Jul - 09,
    Sum (decode("ItemMonth",'Aug-09',"ItemValue",0)) "Aug - 09,
    Sum (decode("ItemMonth",'Sep-09',"ItemValue",0)) "Sep - 09,
    Sum (decode("ItemMonth",'Oct-09',"ItemValue",0)) "Oct - 09,
    Sum (decode("ItemMonth",'Nov-09',"ItemValue",0)) "Nov - 09,
    Sum (decode("ItemMonth",'Dec-09',"ItemValue",0)) "Dec - 09,
    Sum (decode("ItemMonth",'Jan-10',"ItemValue",0)) "Jan - 10,
    Sum (decode("ItemMonth",'Feb-10',"ItemValue",0)) "Feb - 10,
    Sum (decode("ItemMonth",'Mar-10',"ItemValue",0)) "Mar - 10,
    Sum (decode("ItemMonth",'Apr-10',"ItemValue",0)) "Apr - 10,
    Sum (decode("ItemMonth",'May-10',"ItemValue",0)) "may-10,
    Sum (decode("ItemMonth",'Jun-10',"ItemValue",0)) "Jun - 10."
    Sum ("ItemValueOptional") AS "CDA".
    Of
    (
    SELECT
    "Received new proposals" AS "Item."
    To_char(T1.scope_received,'Mon-RR') AS "ItemMonth."
    Count (*) AS "Valeurelement."
    10. AS 'SortOrder '.
    Of
    PRICING_CAPABILITY. POW_DATA t1
    WHERE
    T1.scope_received IS NOT NULL
    AND extract it (FROM AN t1.scope_received) IN (2009,2010)
    ' AND t1.scope_received > = July 1, 2009.
    GROUP BY
    «New proposals received.»
    To_char(T1.scope_received,'Mon-RR'),
    10
    UNION
    SELECT
    "New proposals complΘtΘ' AS"Item. "
    To_char(T2.pricing_approval,'Mon-RR') AS "ItemMonth."
    Count (*) AS "Valeurelement."
    20. AS 'SortOrder '.
    Of
    PRICING_CAPABILITY. POW_DATA t1
    JOIN PRICING_CAPABILITY. POW_LAST_HISTORY t2
    WE
    T1. POW_DATA_ID = t2. POW_DATA_ID
    WHERE
    T2.pricing_approval IS NOT NULL
    AND extract it (FROM AN t2.pricing_approval) IN (2009,2010)
    ' AND t2.pricing_approval > = July 1, 2009.
    GROUP BY
    "End of new proposals."
    To_char(T2.pricing_approval,'Mon-RR')
    )
    GROUP BY
    "Item."
    'SortOrder '.
    ORDER BY
    "SortOrder";

    This view works, IE produced good results by operating (i.e. select * from...) with SQL Developer and SQL Workshop of the Apex section.

    But when I try to produce an Apex report, use it as a data source, I get the following error:

    ORA-01858: a non-digit character was found here where was waiting for a digital

    The error is displayed before that appear part any report itself, that is to say the header of the region is displayed and then the error message.

    So far, everything I could find on the forums or AskTom suggests that this is probably due to a problem. But the goal here is to summarize records dated by month, so I've extracted the elements year and date values, convert them to strings (using TO_CHAR) and then using the resulting chains of "MON - YY" to group the results.

    If there is a better way, I'm interested.

    But I do not understand why the Apex seems to be rejecting what appears to be valid results from a query of valid work.

    Any ideas? Suggestions?

    See you soon,.

    Peter

    You hit some implicit date conversion problem, probably caused by the preferred language of the browser in combination with the use of literals in the query.
    It's a bad idea to use literals as July 1, 2009"in an environment like Apex, which may have different date forrmats according to the preferences of the user.

    At the beginning of the rendered page Apex performs a SESSION of ALTER to change various NLS parameters.
    You can see this by turning on debugging, look for NLS in the resulting output and take a look at the settings that the Apex is application.
    The literal 1 July 2009"means the format DD-MON-YYYY mask, but regional settings applied through Apex may involve a different date format mask.

    Flavio

    ------
    http://oraclequirks.blogspot.com

  • RMAN-03009 and ORA-01858 everything by backing up archiving logs

    Hello!

    Since today, I get the above errors to backup the fra tape archiving logs. I tried the following: error ORA-01858 in RMAN during backup backupset format ' / test/rman/%U'
    If I manually do the backup for a client, it works!

    environment:
    Server: windows 2008 standard server
    Oracle: 10.2.0.4.0

    configuration of RMAN:
    CONFIGURE RETENTION POLICY TO THE 5 DAY RECOVERY WINDOW;
    CONFIGURE BACKUP OPTIMIZATION
    SET UP DEFAULT DISK DEVICE TYPE; # by default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "%F" # by default
    SET UP THE DEVICE TYPE DISK PARALLELISM 1 BACKUP BACKUPSET TYPE; # by default
    CONFIGURE BACKUP OF DATA TO DISK FILE TYPE DEVICE TO 1; # by default
    CONFIGURE BACKUP ARCHIVELOG FOR DEVICE TYPE DISK TO 1; # by default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # by default
    CONFIGURE ENCRYPTION OF DATABASE # by default
    CONFIGURE THE ENCRYPTION ALGORITHM "AES128"; # by default
    CONFIGURE THE NONE ARCHIVELOG DELETION POLICY; # by default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO ' D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SNCFAPEX. ORA'; # by default

    Error log:
    Recovery Manager: Release 10.2.0.4.0 - Production on Thu Oct 1 04:30 2009

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    connected to target database: APEX (DBID = 1331326226)
    connected to the recovery catalog database

    RMAN > sql 'alter system archive log current;
    2 > run {}
    3 > #-> drive backup
    4 > backup archivelog all;
    5 > # FRA-> band
    6 > allocate channel ch1 type 'sbt_tape '.
    7 > PARMS = "BLKSIZE = 262144, ENV = (CvClientName = ora5neu, CvInstanceName = Instance001)"; "
    8 > save the recovery area.
    {9 >}
    10 >
    SQL statement: alter system archive log current

    From backup 1st October 09
    Current archived log
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid = devtype 81 = DISK
    skip the log file archive D:\FRA\APEX\ARCHIVELOG\2009_09_10\O1_MF_1_2720_5BKO9BOL_. ARC; already saved 1 time
    ...
    skip the log file archive D:\FRA\APEX\ARCHIVELOG\2009_10_01\O1_MF_1_2981_5D7PZDXX_. ARC; already saved 1 time
    channel ORA_DISK_1: from archive newspaper backupset
    channel ORA_DISK_1: specification of archive log backup set
    archive log entry thread = 1 sequence = 2733 recid = 2733 stamp = 697286083
    archive log entry thread = 1 sequence = 2734 recid = 2734 stamp = 697293002
    archive log entry thread = 1 sequence = 2735 recid = 2735 stamp = 697293004
    archive log entry thread = 1 sequence = 2856 recid = 2856 stamp = 698142602
    archive log entry thread = 1 sequence = 2857 recid = 2857 stamp = 698142603
    archive log entry thread = 1 sequence = 2982 recid = 2982 stamp = 699078603
    archive log entry thread = 1 sequence = 2983 recid = 2983 stamp = 699078605
    channel ORA_DISK_1: starting piece 1 to October 1 09
    channel ORA_DISK_1: finished piece 1 to October 1 09
    piece handle = D:\FRA\APEX\BACKUPSET\2009_10_01\O1_MF_ANNNN_TAG20091001T043006_5D8520K4_. Tag BKP = comment TAG20091001T043006 = NONE
    channel ORA_DISK_1: complete set of backups, time: 00:00:03
    Backup finished on 1st October 09

    From control file and SPFILE Autobackup 1st October 09
    piece handle = D:\FRA\APEX\AUTOBACKUP\2009_10_01\O1_MF_S_699078626_5D8522W8_. Comment BKP = NONE
    File control finished and SPFILE Autobackup to on 1 October 09

    output channel: ORA_DISK_1
    allocated channel: ch1
    channel ch1: sid = 81 = SBT_TAPE devtype
    channel ch1: CommVault Systems for Oracle: Version 7.0.0 (BUILD76)

    From backup 1st October 09
    specification does not match any data file copy in the repository
    skip the log file archive D:\FRA\APEX\ARCHIVELOG\2009_09_10\O1_MF_1_2720_5BKO9BOL_. ARC; already saved 4 times
    ...
    jump key 5203 backupset; already saved 1 time
    channel ch1: from archive newspaper backupset
    channel ch1: specification of archive log backup set
    archive log entry thread = 1 sequence = 2982 recid = 2982 stamp = 699078603
    archive log entry thread = 1 sequence = 2983 recid = 2983 stamp = 699078605
    channel ch1: starting piece 1 to October 1 09
    channel ch1: finished piece 1 to October 1 09
    piece handle = i2kqm5vv_1_1 tag = comment TAG20091001T043031 = API 2.0, MMS Version 7.0.0.76 Version
    channel ch1: complete set of backups, time: 00:00:16
    entry count = 4670 stamp = 699064230 = creation_time backupset 1st October 09
    channel ch1: starting piece 1 to October 1 09
    RMAN-03009: failure of the backup command on channel ch1 at 2009-10-01 04:31:19
    ORA-01858: a non-digit character was found here where was waiting for a digital
    continue other job steps, not a not working will not re-run
    entry count = 4672 stamp = 699078622 = creation_time backupset 1st October 09
    channel ch1: starting piece 1 to October 1 09
    channel ch1: backup D:\FRA\APEX\BACKUPSET\2009_10_01\O1_MF_ANNNN_TAG20091001T043006_5D8520K4_ piece. BKP
    piece handle = i0kqm5uu_1_2 comment = API Version 2.0, Version MMS 7.0.0.76
    channel ch1: finished piece 1 to October 1 09
    channel ch1: complete set of backups, time: 00:00:07
    entry count = 4673 stamp = 699078626 = creation_time backupset 1st October 09
    channel ch1: starting piece 1 to October 1 09
    output channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03009: failure of the backup command on channel ch1 at 01/10/2009 04:31:35
    ORA-01858: a non-digit character was found here where was waiting for a digital

    Complete recovery manager.

    Thanks for your help!

    Ciao,.
    Christian

    See my note of the Support of Oracle:

    Subject: RMAN backup fails with RMAN-03009 ORA-01858 ORA-01861
    DOC - ID: 744047.1 Type: PROBLEM
    Modification date: 20 March 2009 status: MODERATE

    This could be a NLS_DATE_FORMAT / NLS_LANG questioned.

  • Basic sql oca lession doubts 3 on error ora-01858

    SELECT last_name, hire_date
       FROM   employees
       WHERE  hire_date = TO_DATE('May 24, 1999', 'fxMonth DD, YYYY');
       
    talk about books, it will leave an error (ora-01858 which is a non-numeric error) but the statement being executed perfectly while
    by removing this "fx" - prefix gives an error called ora-01861.

    I'm confused here? can someone show me the right way?

    Hello

    The result depends on your NLS parameters. Yours probably are on something different than AMERICAN. In you language in may can then have a different number of characters (?)

    That's why you hit the ORA-01861 FX Format model with something else without. (Do not see why you should get ORA-01858, however)

    Concerning
    Peter

  • How to avoid the error ORA-01858:

    Hi all
    I use apex 4.1.
    I tried a query while dealing with the dates I had error, but I did not how to avoid it.
    like trying to get the number of students joined between certain dates.
    declare
    SMO varchar2 (100);
    SDO varchar2 (100);
    SYO varchar2 (100);
    SYDS varchar2 (100);
    SYDE varchar2 (100);
    a varchar2 (100);
    b the number;
    D1 date;
    D2 date;
    Start
    Select to_char(sysdate,'MM'), to_char(sysdate,'DD'), to_char(sysdate,'YYYY') in SMO, SDO, SYO double;
    SYDS: = '0602' | SYO;
    SYDES: = '0902' | SYO;
    D1: = to_date(SYDS,'MM/DD/YYYY');
    D2: = to_date(syde,'MM/DD/YYYY');
    run immediately "select |" TO_CHAR (DATE_OF_JOIN, "YY"), (TOTAL_NO_STUDENTS) Count of CROP_SALE where class = 7 and to_char (DATE_OF_JOIN, "YYYY") = to_char (sysdate, "YYYY") and to_date (to_char (DATE_OF_JOIN), "MM/DD/YYYY") > to_date(''d1'',''MM/DD/YYYY'') and to_date(DATE_OF_JOIN,''MM/DD/YYYY'') < to_date(''d2'',''MM/DD/YYYY'') group to_char (DATE_OF_JOIN "AA")' has , b ;
    dbms_output.put_line(a|| b);
    end;
    This error comes in dates d1 & d2 referring, but I did not how slove it.
    can someone help me pls
    Kind regards
    Pavan

    There are two types of errors that I see. First, fix the date format before removing the slashes (because the source has no slash).

    D1: = to_date (SYDS, 'MMDDYYYY');
    D2: = to_date (SYDE, 'MMDDYYYY');

    Secondly, in the statement immediately execute you put in the text "d1" and "d2", not the values of d1 and d2. You must either concatenate the values like this:

    to_date('||) D1 |', "MM/DD/YYYY)

    Or better yet, use bind variables like this:

    to_date(:B1,''MM/DD/YYYY'')

    and add a "using" clause

    using d1, d2;

    I made the changes in the code. Try this:

    declare
      SMO  varchar2(100);
      SDO  varchar2(100);
      SYO  varchar2(100);
      SYDS varchar2(100);
      SYDE varchar2(100);
      a    varchar2(100);
      b    number;
      d1   date;
      d2   date;
    begin
      select to_char(sysdate, 'MM'),
             to_char(sysdate, 'DD'),
             to_char(sysdate, 'YYYY')
        into SMO, SDO, SYO
        from dual;
      SYDS := '0602' || SYO;
      SYDE := '0902' || SYO;
      d1   := to_date(SYDS, 'MMDDYYYY');
      d2   := to_date(SYDE, 'MMDDYYYY');
      execute immediate 'select to_char(DATE_OF_JOIN,''YY''),
                         COUNT(TOTAL_NO_STUDENTS)
                         from CROP_SALE
                         where class=7
                         and to_char(DATE_OF_JOIN,''YYYY'')=to_char(sysdate,''YYYY'')
                         and to_date(to_char(DATE_OF_JOIN),''MM/DD/YYYY'') > :B1
                         and to_date(DATE_OF_JOIN,''MM/DD/YYYY'') < :B2
                         group by to_char(DATE_OF_JOIN,''YY'')'
        into a, b
        using d1, d2;
      dbms_output.put_line(a || b);
    end;
    

    Edit: Fixed the to_date function, which operated on a date. Also fixed an extra | After the selection

  • Validate the XML: DateTime-&gt; ORA-01830 / 01858

    Hello

    I'm trying to parse an XML document that contains an element which is defined as DateTime
    <CreDtTm>2012-06-02T09:30:47.000Z</CreDtTm>
    The xsd is as follows
    <xs:element name="CreDtTm" type="ISODateTime"/>
    ...
    <xs:simpleType name="ISODateTime">
      <xs:restriction base="xs:dateTime"/>
    </xs:simpleType>
    For me the format looks OK, but I get
    ORA-01830: date format picture ends before converting entire input string
    I found http://stackoverflow.com/questions/6370035/why-dbms-xmlschema-fails-to-validate-a-valid-xsdatetime/6382096#6382096
    and changed the schema:
    <xs:simpleType name="ISODateTime" xdb:SQLType="TIMESTAMP WITH TIME ZONE">
    Now, I get
    ORA-01858: a non-numeric character was found where a numeric was expected
    So I tried
    ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='yyyy-mm-dd"T"hh24:mi:ss.ff3"Z"';
    and tested
    select systimestamp from dual;
    
    SYSTIMESTAMP
    ----------------------------------------
    2012-07-27T10:52:05.860Z
    The exact format, but still ORA-01858.

    Validation is performed with
    DECLARE
      xmldoc XMLTYPE;
    DECLARE
      xmldoc XMLTYPE;
    BEGIN
        xmldoc := XMLTYPE(q'[<?xml version="1.0" encoding="UTF-8"?>
          ...
          <CreDtTm>2012-06-02T09:30:47.000Z</CreDtTm>
          ...]');
        xmldoc := xmldoc.createSchemaBasedXML('http://...xsd');
        XMLTYPE.schemaValidate(xmldoc);
    END;
    Anyone know where I am going wrong?
    select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for HPUX: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Concerning
    Marcus

    Published by: Marwim on 27.07.2012 11:45
    Addition of the db version

    Hi Marcus,

    This one is interesting.
    I had already implemented my own example shortly before posting your own, then here's something that works for me:

    BEGIN
    
      dbms_xmlschema.registerSchema(
        schemaURL => 'test_ts.xsd'
      , schemaDoc => 
    
      '
    
      
      
        
      
    '
    
      , local => true
      , genTypes => false
      , genTables => false
      , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
      );
    
    END;
    /
    
    SQL> DECLARE
      2    doc xmltype := xmltype('2012-06-02T09:30:47.000Z', 'test_ts.xsd');
      3  BEGIN
      4    doc.schemaValidate();
      5  END;
      6  /
    DECLARE
    *
    ERROR at line 1:
    ORA-30992: error occurred at Xpath /CreDtTm[@SYS_XDBBODY$]
    ORA-01858: a non-numeric character was found where a numeric was expected
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at line 4
    

    OK, same error so far.

    SQL> REM : change from ", " to ".,"
    SQL> ALTER SESSION SET nls_numeric_characters = '.,';
    
    Session altered.
    
    SQL> DECLARE
      2    doc xmltype := xmltype('2012-06-02T09:30:47.000Z', 'test_ts.xsd');
      3  BEGIN
      4    doc.schemaValidate();
      5  END;
      6  /
    
    PL/SQL procedure successfully completed.
    

    Now it's working.

    I know that there is an implicit conversion happening in addition to automatic mapping "dateTime"--> 'TIMESTAMP WITH time ZONE'.
    Documentation, although not very clear, seems to hint in that direction:

    With the help of Z back to indicate the time zone UTC

    XML Schema allows the time zone specified under Z, component to indicate the UTC time zone. When a leaking Z value is stored in a SQL TIMESTAMP WITH time ZONE TIMES column, the time zone is actually stored as + 00:00. Thus, the value retrieved contains the leak + 00:00, not the original Z. For example, if the value in the input XML document is 1973-02-12 T 13: 44:32Z, the output is 1973-02 - 12 T 13: 44:32.000000 + 00:00.

    So I think that Oracle is attempting to expand "2012-06 - 02T 09: 30:47.000Z" at "2012-06 - 02 T 09: + 00:00 30:47.000000"but relying on the NLS configuration session to determine the decimal separator used in the fractional part of timestamp.»

  • ERR: a non-digit character was found here where was waiting for a digital

    Hello

    I'm trying to load data into an oracle from oracle table.

    I am getting following error:
    java.sql.SQLDataException: ORA-01858: a non-digit character was found here where was waiting for a digital

    When I run the sql code in the SQL Developer it gives me error like:

    Error report:
    SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
    01858 00000 - "a non-digit character found here where was waiting for a digital".
    * Cause: Input data to convert using a date format model has been
    incorrect answer. The input data did not contain a number where is a number
    required by the format model.
    * Action: Fix the input data or the date format model to ensure that the
    elements correspond to the number and the type. And then try the operation again.



    Please give me any suggestions...



    Thank you

    try to copy the code generated to the developer of Toad or sql and execute it. You will get the same error here.

    Now, try to give the date format according to your NLS parameter as to_date (source_coulumn, 'yyyymmdd') etc in the mapping target.

    Thank you.

  • PL/SQL Script finishes the job.

    I started today with PL - SQL
    So I use the book of Fred Feuerstein's Oracle PL/SQL Programming.

    As example of paintings serve a table book... you can create and populate with the date by a script of the home page of O'Reilly.
    But it don't work on my Oracle database get a mistake.

    Error on line 27
    ORA-01858: A non-digit character was found, while awaiting a numeric character
    ORA-06512: In line 34

    Script done on line 27.

    Below is the script to create and fill the database. The tool used is the Toad and the database used is Oracle 11 g Enterprise 2.

    What's wrong???

    --------------------------------------------------------------------------------------
    REM $Id: books.tab, v 1.1 2001/11/30 23:09:48 bill Exp $
    REM of the "learning Oracle PL/SQL" page 64

    Create table 'books' REM

    (Books) CREATE TABLE
    ISBN VARCHAR2 (13) NOT NULL PRIMARY KEY,
    title VARCHAR2 (200),
    Summary VARCHAR2 (2000).
    author VARCHAR2 (200),
    date_published DATE,
    page_count NUMBERS
    );




    REM Script to insert sample records to books

    REM Note: Must SET DEFINE OFF or SQL * Plus will intercept the ampersand
    Characters of REM (&) before they are sent to the server. SQL * more generally uses
    REM an ampersand to designate a variable that requires the user to provide a
    REM value interactively.

    SET DEFINE OFF

    DECLARE
    PROCEDURE insert_book_no_complaints (isbn_in IN VARCHAR2, title_in IN VARCHAR2,
    summary_in IN VARCHAR2, author_in IN VARCHAR2, date_published_in IN DATE,
    page_count_in in NUMBERS)
    IS
    BEGIN
    INSERT INTO books (isbn, title, author, abstract, date_published,)
    page_count)
    VALUES (isbn_in, title_in, summary_in, author_in, date_published_in,
    page_count_in);
    EXCEPTION
    WHEN DUP_VAL_ON_INDEX
    THEN
    NULL;
    END;

    BEGIN

    insert_book_no_complaints ('' 0-596-00381-1)
    "Oracle PL/SQL Programming,"
    "Of reference for PL/SQL developers, including examples and best practices"
    || "recommendations."
    'Syndrome Feuerstein, Steven, with Bill Pribyl',
    25-sep-2002 ", / * best guess from August 22 02 * /"
    (NULL); / * do not yet know how many pages * /.

    insert_book_no_complaints ('0-596-00180-0 ",)
    "Oracle PL/SQL for learning."
    "Beginner" s guide to Oracle "s PL/SQL programming language",
    'Bill Pribyl with Steven Feuerstein',
    November 29, 2001 ",
    401);

    insert_book_no_complaints ('1-56592-578-5',
    "Oracle SQL * more: The Definitive Guide", ".
    "The complete treatment of Oracle" interactive database tool of is,
    "Gennick, Jonathan."
    March 1, 1999. "
    502);

    insert_book_no_complaints ('1-56592-457-6 ",)
    "Oracle PL/SQL Language Pocket Reference.
    "Quick guide to Oracle PL/SQL developers. Includes Oracle8i '
    || 'coverage.',
    "Feuerstein syndrome, Steven, Bill Pribyl, Chip Dawes,
    APRIL 1, 1999 ", 94);

    insert_book_no_complaints ('' 0-14071-483-9)
    "The tragedy of King Richard the third.
    "The popular historic Shakespeare play in which a modern publication.
    || "royal treacherous tries to steal the Crown but died without horses."
    || "in the battle."
    "Shakespeare, William,
    AUGUST 1, 2000 ",
    (158);

    insert_book_no_complaints ('' 0-14-071415-4)
    "The storm."
    "Duke and the girl on the enchanted island to meet old enemies in this."
    || "comic tale of mystery, love, magic, and (eventually) forgiveness."
    "Shakespeare, William,
    JANUARY 1, 1959.
    (120);

    insert_book_no_complaints ('' 0-672-31798-2)
    "Sams Teach Yourself PL/SQL in 21 days, second edition."
    "Tutorial for Oracle" language procedural s organized presentation.
    || "the features of language in three weeks learning annex.",
    'Gennick, Jonathan, with Tom Luers',
    DECEMBER 1, 1999 ",
    692);

    insert_book_no_complaints ('' 0-07-882438-9)
    "Oracle PL/SQL tips and Techniques."
    "Voluminous tome with tips, techniques and reference documents on.
    || "Oracle" PL/SQL s.',
    "Trezzo, Joseph C."
    JULY 1, 1999 ",
    942);

    insert_book_no_complaints ('' 0-13-794314-8)
    'Create smart with Oracle PL/SQL triggers and stored databases'
    || "Procedures - 2nd ed.",
    "Programmer" PL/SQL s guide, oriented to the reusable construction. "
    || "components for large Oracle applications.",
    "Owens, Kevin T."
    JUNE 1, 1999 '.
    544);

    insert_book_no_complaints ('1-56592-674-9',
    "Oracle PL/SQL Developer's Workbook',
    "" Beginner, intermediate and advanced exercises to test the "."
    || "drive s"knowledge"of Oracle PL/SQL programming language s."
    'Syndrome Feuerstein, Steven, with Andrew Odewahn',
    1 May 1999 '.
    588);


    END;


    COMMIT;

    ALL SET ON

    ;

    privrt, PRIVET ;)
    use in the script

    alter session set nls_language='AMERICAN';
    alter session set NLS_DATE_LANGUAGE='AMERICAN';
    

    and inserts

    to_date(,)
    
  • Problem with the conversion of the date

    Hello

    I have a column called period_name which is of type varchar which contains data as jan-02 Feb-03 and 05-02, now my requirement is I want convert month names number say jan-02 to 01-02.

    I tried to use to_char (to_date(period_name,'mm/yy'), 'mm - yy') which gives good results to the selection, but when I use the same creation then Sunrise error


    [Error] Run (58:24): ORA-01858: a non-digit character was found here where was waiting for a digital


    Query:

    create the table dumm1 as
    (
    Select to_char (to_date(period_name,'mm/yy'), 'mm - yy') in the period_name of xx_alll
    )

    Concerning

    Published by: 862807 on June 13, 2011 03:30

    862807 wrote:

    Here when I write a select statement which I produced earlier works fine, but when I write the same create in her statement generates an error.

    No it's not.

    You're not extract all lines, you use Toad or some other GUI to confuse you. Enter the results data grid and type CTRL + end to fetch the last row. Or use sqlplus. The selection will fail too.

  • date time conversions

    Hi all

    I'm looking for help to convert the time format data from my web service to the local time zone on my DB

    UPD_DTTM filed in my oracle DB's with the data type: TIMESTAMP (6) WITH LOCAL time ZONE

    Time from my webservice is:

    June 22, 2015 4:34:38 GMT + 5:30

    Does not:

    UPDATE test_table SET UPD_DTTM = to_timestamp_tz (June 22, 2015 4:34:38 GMT + 05:30 "," DD-MM-YYYY HH TZH:TZM') where id = 123

    Error:

    ORA-01858: a non-digit character was found here where was waiting for a digital



    Case work:

    UPDATE SET test_table UPD_DTTM = to_timestamp_tz (June 22, 2015 04:34:38 + 5:30 ',' YYYY-MM-DD hh TZH:TZM') where id = 123

    Can you please help do not work scenario works

    Thank you

    I wonder about the answer you marked as correct.

    1. the correct way to handlig GMT in this case was illustrated by kulikouski.

    It is to use double quotes.

    2. missed completely solutions isn't scoring HH24. So let AM/PM in.

    3 Last but not least, it is not MM, but lun.

    That's why

    TO_TIMESTAMP_TZ (June 22, 2015 4:34:38 GMT + 17:30 ',' Mon DD YYYY HH "GMT" TZH:TZM AM ',' NLS_DATE_LANGUAGE = English ')

  • the date conversion

    Hello Experts;

    I tried to use the to_date, but it seems to give an error message saying the following below.

    ORA-01858: a non-digit character was found here where was waiting for a digital

    01858 00000 - "a non-digit character found here where was waiting for a digital".

    * Cause: Input data to convert using a date format model has been

    incorrect answer.  The input data did not contain a number where is a number

    required by the format model.

    * Action: Fix the input data or the date format model to ensure that the

    elements correspond to the number and the type.  And then try the operation again.

    How do one converts the following

    01-SEP-95

    JANUARY 30, 96

    APRIL 7, 98

    MARCH 27, 90

    3 MARCH 01

    OCTOBER 1, 87

    15 AUGUST 02

    to DD/MM/YYYY in oracle. Thank you

    Hello

    user13328581 wrote:

    Hello Experts;

    I tried to use the to_date, but it seems to give an error message saying the following below.

    ORA-01858: a non-digit character was found here where was waiting for a digital

    01858 00000 - "a non-digit character found here where was waiting for a digital".

    * Cause: Input data to convert using a date format model has been

    incorrect answer.  The input data did not contain a number where is a number

    required by the format model.

    * Action: Fix the input data or the date format model to ensure that the

    elements correspond to the number and the type.  And then try the operation again.

    How do one converts the following

    01-SEP-95

    JANUARY 30, 96

    APRIL 7, 98

    MARCH 27, 90

    3 MARCH 01

    OCTOBER 1, 87

    15 AUGUST 02

    to DD/MM/YYYY in oracle. Thank you

    All DATEs have the same format, which is nothing like "MM/DD/YYYY".  You do not convert to a given format, convert you to DATEs, like this:

    To_date (str, 'DD-MON-RR')

    If you must explicitly show a DATE d "MM/DD/YYYY" format, then you can use:

    To_char (d, "DD/MM/YYYY"

    See https://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

Maybe you are looking for

  • Can I install FF 4 RC and keep FF3.6.15 installed until I have check the RC?

    I'm under FF3.6.15. I want to test the RC 4 FF. Can I install the RC while keeping the 3.6.15 on my system temporarily?

  • Shor cut menu reference

    I created a multicolumn with a shortcut menu Listbox. I would like to "Set Menu Item Info function" allows you to change menu items during execution. How can I get the reference in the shortcut menu? Kind regards Ljubo.

  • Win 7: always show the same user on logon screen

    We have a laptop the meeting, which will serve as a different internal and external users. Internal users to connect with the own domain Login. External users take a local user named "external." How can I set, as each start-up, as 'external' user wat

  • Is there a way to record DX Ball with FRAPS and Assassin Creed 1?

    I tried to register with FRAPS AC1 several times, but each time the video renderer is all black with the sound game and his microphone. Is there a way to fix this? I have considered upgrading to AC2, is - this logic or a waste? My version of AC1 is a

  • Windows 7 product key issue

    I've recently updated my computer to Windows 8 Professional. Is it possible to use my Windows 7 product key I bought this PC to another PC?