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 digitalSQL > 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')));
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
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?
-
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_AV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RNT_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,.
PeterYou 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 -
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
Any idea?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;
KaiHello
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 toAND TRANSDATE BETWEEN TO_DATE('17-OCTOBER-2009 000000','DD-MONTH-YYYY HH24MISS') AND TO_DATE('23-OCTOBER-2009 235959','DD-MONTH-YYYY HH24MISS')
Arun-
-
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,.
ChristianSee 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: MODERATEThis could be a NLS_DATE_FORMAT / NLS_LANG questioned.
-
Basic sql oca lession doubts 3 on error ora-01858
talk about books, it will leave an error (ora-01858 which is a non-numeric error) but the statement being executed perfectly whileSELECT last_name, hire_date FROM employees WHERE hire_date = TO_DATE('May 24, 1999', 'fxMonth DD, YYYY');
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
PavanThere 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->; ORA-01830 / 01858
Hello
I'm trying to parse an XML document that contains an element which is defined as DateTime
The xsd is as follows<CreDtTm>2012-06-02T09:30:47.000Z</CreDtTm>
For me the format looks OK, but I get<xs:element name="CreDtTm" type="ISODateTime"/> ... <xs:simpleType name="ISODateTime"> <xs:restriction base="xs:dateTime"/> </xs:simpleType>
I found http://stackoverflow.com/questions/6370035/why-dbms-xmlschema-fails-to-validate-a-valid-xsdatetime/6382096#6382096ORA-01830: date format picture ends before converting entire input string
and changed the schema:
Now, I get<xs:simpleType name="ISODateTime" xdb:SQLType="TIMESTAMP WITH TIME ZONE">
So I triedORA-01858: a non-numeric character was found where a numeric was expected
and testedALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='yyyy-mm-dd"T"hh24:mi:ss.ff3"Z"';
The exact format, but still ORA-01858.select systimestamp from dual; SYSTIMESTAMP ---------------------------------------- 2012-07-27T10:52:05.860Z
Validation is performed with
Anyone know where I am going wrong?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;
Concerningselect * 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
Marcus
Published by: Marwim on 27.07.2012 11:45
Addition of the db versionHi 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 => '
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 4OK, 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.»
-
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 ')
-
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?
-
I am writing a process to delete records based on dates.
Here is the chart:
Column name Data type Nullable Default Primary key ID NUMBER NO. - 1 CT_NAME VARCHAR2 (100) Yes - - CT_CATEGORY VARCHAR2 (100) Yes - - BASE_PTS NUMBER Yes - - PROD_PTS NUMBER Yes - - REF_PTS NUMBER Yes - - START_DATE DATE Yes - - END_DATE DATE Yes - - CREATED_ON DATE Yes - - CREATED_BY VARCHAR2 (50) Yes - - UPDATED_ON DATE Yes - - UPDATED_BY VARCHAR2 (50) Yes - - start_date and end_date are the fields of date key.
The query will remove the dates with specific start and end dates. The question I have, is that I get a ORA-01858: a non-digit character was found here where was waiting for a digital error while the query is running.
remove from ct_point_values
where start_date =: P4_START_DATE_V
and end_date =: P4_END_DATE_V
If I run the query in the sql window, no problem:
remove from ct_point_values
where start_date =' 01 / 01/2014 '
and end_date = 31 December 2014"
Find the query with the works of values hard-coded. Links to fail. I tried casting and to_char to_date variations with no luck.
One thing that I notice, is that when I go to enter my bind variables in the sql workshop, the fields are pre-populated with this:
1 & amp; #x2F 1 & amp; #x2F; 2014
12 & amp; #x2F 31 & amp; #x2F; 2014
01/01/2014 and 31/12/2014. I found that the only element relates to this suggests that this is a possible bug:
SQL Bind Variables workshop - Date issues
Any thoughts on how to address this issue, or is it really a bug?
I run on Apex 4.2, 11g.
Thank you!
Hello
I guess that these dates come from elements on the page to which the user can select a range of dates.
These fields have a custom format mask?
What seems to be the case for me, is that these fields have an explicit format mask (for example: DD/MM/YYYY) but the default database/session format mask is something different (e.g. DD-MON-YYYY).
I suppose also that the issue in the SQL workshop isn't something related.
-
Hello
Please check this query
I get the error message
INSERT INTO OT_ENTR(OT_Date,EMP_DPT,EMP_SEC,EMP_ID,EMP_NAME,EMP_MOB,EMP_ROT,EMP_WTP,EMP_WHS,EMP_STM,EMP_ETM,OT_PUR) VALUES
(To_Date(:P16_DATE,'YYYY/MM/DD'),: P16_DPT,: P16_SEC,: P16_EMP_CD,: P16_EMP_NM,: P16_MOB,: P16_ROUTE,: P16_WLIST,: P16_HRS,: P16_STIME,: P16_ETIME,: P16_PUR);
"ORA-01858: a non-digit character was found here where was waiting for a digital".URL https://apex.oracle.com/pls/apex/f?p=4550:1:0
Name of the workspace - THERESE
username - test
password - test123
Kind regards
Thérèse
Hi @upen.
First of all, you tried to throw your date format "YYYY/MM/DD". If you have correctly inserted 8 December 2014 ' for OT_Date, means that the format that follows you to your database to date is "MM/DD/YYYY" format, so you need to replace To_Date(:P16_DATE,'YYYY/MM/DD') by To_Date(:P16_DATE,'MM/DD/YYYY'). Another, try converting your digital input for EMP_MOB, EMP_WHS, EMP_STM, EMP_ETM to / integer.
If this does not resolve your problem, try to print your entries for tracing. You might have missed the orders so that the values are mixed up. Paste the track here for us to see. Good luck!
-
Help! -Error with the new Patch APEX 4.2.5.00.08 import
Export from Dev and import in staging gives this error to the stack:
Execution of the statement was not successful. ORA-01858: a non-digit character was found here where was waiting for a digital
begin wwv_flow_api.post_import_process(p_flow_id => wwv_flow.g_flow_id); null; end;
ORA-01858: a non-digit character was found here where was waiting for a digital
Has anyone else seen elsewhere or, more important, does anyone have a work around at this point, we cannot promote any code.
Thank you
-Joe
Joe,
A downside of the workaround suggested, is that you will lose all saved private interactive reports.
The exception set patch for bug 18719750 to APEX 4.2.5 is now available on My Oracle Support. Please let me know if you encounter any problems.
Joel
Maybe you are looking for
-
4G indicates market when you are connected to the Photon WiFi 4 G
Everyone knows this? Since the last update with 4G start-up it displays connected to the notification area even if it is not connected and wifi is connected. Any idea what could be the cause? Thank you
-
Problems with the power of the Xbox 360 WRT54G signal
Here's what I have high down. ActionTek GT701 (Qwest 7.0Mbps) Linksys WRT54G Reference Dell 530 (wired) XBOX 360 Arcade (wired) XBOX 360 Elite (wired) Printer Dell Wireless (wireless) Dell Dimension 2350 (wireless) I started with an xbox connected to
-
Deleting a user account without losing files
Some time before, when I started using Win 7, I was told to prevent people to access your computer, the best thing is to create another user account so that your administrator account has been left untouched and pure. Now, I'm the only one to have a
-
How to migrate a model of data from 4.0.1 to 4.0.3?
I just started to use to shape this week. I have a data model that is registered in the default workspace under the 4.0.1 area. I installed the 4.0.3 version in a separate area. How can I migrate the data model to the 4.0.3 4.0.1? Just copy the t
-
How to assign values to the current element where the cursor is?
Hi allI have a block of "tabular" data, B_Emp (from the Employee table) and the other non-database & non tabular block consisting of a text_items B_Test.'Emp_id' is one of the column in the Employee table and I want to attribute all the values of the