ORA-01858: a non-numeric at OracleConnectionPoolDataSource
I have OracleConnectionPoolDataSource. When I run my JSP , I am getting error
java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
Error line is showing at OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource();
What could be the reason?
Thanks in advance
select to_date('ERROR')
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expectedPlease see (OERR: ORA 1858 "a non-numeric character was found where a numeric was expected" [ID 19182.1]).
Thanks,
Hussein
Similar Messages
-
I'm trying to pull data from an Oracle database using SSIS. When I try to select a few fields from the source table, it returns the following error message:
[OLE DB Source [47]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80040E14 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
The source columns are a combination of numeric and texts, and I've also tried selecting one of them, which didn't work. I'm using the Oracle client 11.2.0.1, and it works fine with any other data sources I have connected to so far. How can I resolve this
error?Hi H.James,
According to your description, the issue is a non-numeric character was found where a numeric was expected while pulling data from an Oracle database in SSIS.
Based on the error message, the issue should be you are comparing a number column to a non-number column in a query. Such as the query below (ConfID is a number, Sdate is a date):
where C.ConfID in (select C.Sdate
from Conference_C C
where C.Sdate < '1-July-12')
Besides, a default behavior for the Oracle OleDb Provider that change the NLS Date Format of the session to 'YYYY-MM-DD HH24:MI:SS can also cause the issue. For more details about this issue, please refer to the following blog:
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
ORA-01858: a non-numeric character was found where a numeric was expected
hi ,
This was the code which shows the sales rep invoice amount and collected amount but while running report thru concurrent program its showing the following error:
ORA-01858: a non-numeric character was found where a numeric was expected
WHERE TO_CHAR ( TO_DATE ( PS.GL_DATE , 'DD/MON/YY' ) , 'MON-YYYY' ) BETWEEN TO_CHAR ( TO_DATE ( : ==> P_todate , 'YYYY/MM/DD' ) , 'MON-YYYY' ) AND TO_CHAR ( TO_DATE ( : P_todate , 'YYYY/MM/DD' ) , 'MON-YYYY' ) AND ps.customer_id = cust.custome
The Actual Code was this
SELECT SUBSTR(SALES.name,1,50) salesrep_name_inv,
--ps.CLASS,
SUM(ABS(ps.acctd_amount_due_remaining)) acctd_amt,
SUM(ABS(ps.amount_due_remaining)) amt_due_remaining_inv,
SUM(ABS(ps.amount_adjusted)) amount_adjusted_inv,
SUM(ABS(ps.amount_applied)) amount_applied_inv,
SUM(ABS(ps.amount_credited)) amount_credited_inv,
SALES.salesrep_id,
NULL "REMARKS"
-- ps.gl_date gl_date_inv,
FROM ra_cust_trx_types ctt,
ra_customers cust,
ar_payment_schedules ps,
ra_salesreps SALES,
ra_site_uses site,
ra_addresses addr,
ra_cust_trx_line_gl_dist gld,
gl_code_combinations c,
ra_customer_trx ct
WHERE TO_CHAR(TO_DATE(PS.GL_DATE,'DD/MON/YY'),'MON-YYYY')
BETWEEN TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY') AND TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY')
AND ps.customer_id = cust.customer_id
AND ps.customer_trx_id = ct.customer_trx_id
AND ps.cust_trx_type_id = ctt.cust_trx_type_id
AND NVL(ct.primary_salesrep_id, -3) = SALES.salesrep_id
AND ps.customer_site_use_id+0 = site.site_use_id(+)
AND site.address_id = addr.address_id(+)
AND TO_CHAR(TO_DATE(PS.GL_DATE_CLOSED,'DD/MON/YY'),'MON-YYYY')
BETWEEN TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY') AND TO_CHAR(TO_DATE(:P_todate,'YYYY/MM/DD'),'MON-YYYY')
--AND ps.gl_date_closed > TO_DATE(:P_todate,'MON-YYYY')
AND ct.customer_trx_id = gld.customer_trx_id
AND gld.account_class = 'REC'
AND gld.latest_rec_flag = 'Y'
AND gld.code_combination_id = c.code_combination_id
AND sales.salesrep_id is not null and sales.name is not null
-- and ps.payment_schedule_id+0 < 9999
-- AND SALES.salesrep_id ='1001'
GROUP BY SALES.name,
--ps.CLASS,
SALES.salesrep_idSo to_date function accepts a string as input and returns a date. When a date is input instead, it is implicity converted to the required type of the function paremeter, which is a string, so that to_date can convert it back to a date again.
If you are lucky with the implicit conversion, you get the same date back, if you are not you might get a different date or an error.
From your query it appears that this conversion from a date, to a string, to a date, and then back to a string using to_char this time, is being done to remove the time or day part of the date. The actual range comparison is being done on strings rather than dates, which is dangerous as strings sort differently than dates.
In this example if I sort by date, Jan 01 comes between Dec 00 and Feb 01 as you would expect.
SQL> select * from t order by d;
D
12-01-2000
01-01-2001
02-01-2001When converted to strings, Feb 01 comes between Dec 00 and Jan 01, which is probably not the desired result
SQL> select * from t order by to_char(d,'DD-MON-YY');
D
12-01-2000
02-01-2001
01-01-2001If you want to remove time and day parts of dates you should use the trunc function
trunc(d) removes the time, trunc(d,'mm') will remove the days to start of month.
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions201.htm#i79761 -
ORA-01858: a non-numeric character found where a digit was expected
Hi,
I'll cut introductions short. We're trying to read data from a flat file (OWB ver.9.2. by the way). After successfully mapping, then generating (with two insignificant warnings), we execute.
Although it says the execution was 'successful', more than a dozen errors return in the form of ORA-01858: a non-numeric character found where a digit was expected
a - Here is the error:
Record 1: Rejected - Error on table "TOPSSTAGE"."FLTR_DCS_IRREG", column "OPERATIVE_FLIGHT_LEG_DATE".
ORA-01858: a non-numeric character was found where a numeric was expected
*it's actually repeated 20 times (Record 1, Record 2, and so on and so forth...) with the same exact error description and details.
b - Here's the part of the OWB-generated script that defines the creation of that field/column:
"OPERATIVE_FLIGHT_LEG_DATE" DATE "mm/dd/yyyy"
c - And here's the data from the flat file (1 of 4 rows)
"2/20/2007","I","0899","N","TPE","MNL","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","750","950","746","955"," P3231",,"04","32","32",,,,,,,,"758","946",,"A000","4","D000","5","000","0","0","0","0","D","P","0","0","0","0","0","0","0","0","0","0","0","2/22/2007","000","012","144","2/20/2007","2/20/2007"
*the part where it is in bold is the one that is mapped from the column OPERATIVE_FLIGHT_LEG_DATE to the OPERATIVE_FLIGHT_LEG_DATE column (flat to physical, right?)
it is set as DATE in all settings (mapping, file, etc..)
Any form of help will be greatly appreciated :)
Thanks!
Regards,
_lilimHi Bharadwaj,
Yes, I believe you are right. And yes that column is designated a primary key. The weird thing is, we do have null values being entered into the table from the flat file, but these values are far from the "OPERATIVE_FLIGHT_LEG_DATE" column (index-wise). Let me give you an example of our case:
this is a row in the flat file: (sample data only)
"2/20/2007","I","0899","N","TPE","MNL","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","750","950","746","955"," P3231",,"04","32","32",,,,,,,,"758","946",,"A000","4","D000","5","000","0","0","0","0","D","P","0","0","0","0","0","0","0","0","0","0","0","2/22/2007","000","012","144","2/20/2007","2/20/2007"
as you can see, I've made the 'null' values bold, as well as the data for OPERATIVE_FLIGHT_LEG_DATE (which shows up, as you can see, at the end of the row).
Now, in the OWB table, the OPERATIVE_FLIGHT_LEG_DATE column is set as a primary key (or foreign, i think, I'll check again) and, thus, is set as one of those columns to first receive data transferred from the flat file.
We see nothing wrong with our mask (which is mm/dd/yyyy by the way) as well as with our data type settings. It has to be with the flat file I guess. We're gonna try putting in dummy values in place of the null ones in the flat file. I'll get back to you asap. Thanks for helping out. :D
Regards,
_lilim -
I'm trying to write a PL/SQL function to dynamically return a query with varying # of columns. I've done this type of thing before wiith much success, however this is the first time I'm using a cursor for loop within a function to accomplish my task.
here is the error I get:
ORA-01858: a non-numeric character was found where a numeric was expected
Error ERR-1101 Unable to process function body returning query.
Mind you I have tested the PL/SQL from a SQL editor and it works fine. I'm confused.
Code is below.
Thanks in advance!
DECLARE
my_query varchar2(4000);
string1 varchar2(50) := 'select city, ';
string2 varchar2(4000) := '' ;
string3 varchar2(4000):= 'from
( select a.title, a.city, a.start_date, sum(a.total_stu) cnt
from sj_class_summary3 a
group by a.title, a.city, a.start_date
having a.title = :P4_COURSE )
group by title, city';
TYPE date_tab_type IS TABLE OF date INDEX BY PLS_INTEGER;
date_tbl date_tab_type;
i number;
BEGIN
i:=1;
for myrec in (select distinct start_date from sj_class_summary3
where start_date between :P4_START_DATE and :P4_END_DATE order by 1) loop
date_tbl(i) := myrec.start_date;
string2 := string2 || ' max( decode( start_date, ''' || date_tbl(i) || ''', cnt,0) ) "' || date_tbl(i) || '", ';
i := i+ 1;
end loop;
string2 := SUBSTR(string2,1,LENGTH(string2)-2);
string2 := string2 || ' ';
my_query := string1 || string2 || string3;
return my_query;
END;Hi Bob,
you also have another date to character to date conversion in:
decode( start_date, ''' || date_tbl(i) || ''', cnt,0)
does this need to be:
decode( start_date, to_date(''' || to_char(date_tbl(i), 'dd/mm/yyyy') || ''', ''dd/mm/yyyy''), cnt,0)
Regards
Michael -
JDBCaccess message ORA-01858: a non-numeric character was found where a num
When trying to read a cloumn from a table using JDBC I get the above message
Below is a copy of the code;
Connection conn=null;
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
System.out.println ("Driver registered"); // Print Driver Connected
try
{ // <-- 1.1
conn = DriverManager.getConnection("jdbc:oracle:thin:@***.******.**:1521:orcl", "********", "*******");
// @machineName:port:SID, userid, password
} // <-- 1.1
catch (SQLException exc_1)
{ // <-- 1.1
//System.out.println("SQL Connect failed with: '" + exc_1.getMessage() + "'");
exc_1.printStackTrace();
System.exit(1);
} //<-- 1.1
System.out.println ("Connected - User/Password"); // Print Connected User/Password
Statement stmt = conn.createStatement();
System.out.println ("Instansiate SQL Statement "); // Print Instansiate
String sql = "select BASE_CURRENCY_CODE from WH_ENT_MODEL.V_FX_DAILY_RATES ";
try
oracle.jdbc.driver.OracleLog.startLogging();
PreparedStatement ps = conn.prepareStatement(sql);
ResultSet rs = ps.executeQuery();
oracle.jdbc.driver.OracleLog.stopLogging();
System.out.println ("Create SQL Statement resultset "); // Print SQL Statement
while (rs.next())
System.out.println (rs.getString("BASE_CURRENCY_CODE")); // Print Base_Currency_Code
stmt.close();
catch(Exception e)
e.printStackTrace();
System.exit(1);
The error I get is;
java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:153)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:930)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1131)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:983)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1257)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3467)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3512)
at com.exchange.interfaces.dbAccess.main(dbAccess.java:69)
This is a test class to prove we can access the database from within Java program.
Any help much appreciated.Hi Deepak,
I would first look at your session state, this should show what was passed to the procedure.
I would suggest that if you have a select list showing a null value that that would be the issue as it passes %null% through.
Regards
Michael -
Ora-01858 a non numeric found where numeric was found
Hello All,
When I am trying to query a view i am getting the follwoing error.
ora-01858 a non numeric found where numeric was found
When checked in all_objects the view status is showing as VALLID.
Please let me know how do we come over this error.
Kind Regards.I can think of two options:
1-Create the view with the same datatype as the underlying column, then in your application handle the logic of conversion
2-Keep the view with the same datatypes, but use a function that takes the value in the column as IN paramter and returns the date. Add exception handling to ignore the exception when a non-date value is encoutered
Regards
AK -
01858: a non-numeric character was found where a numeric was expected
Hi ,
I had ran a code
SELECT TO_DATE (create_date,'MM/DD/YYYY HH12:MI:SS PM')
FROM TABLE_A
where i got error
-01858: a non-numeric character was found where a numeric was expected
but later i changed to
SELECT TO_CHAR (create_date,'MM/DD/YYYY HH12:MI:SS PM')
FROM TABLE_A
which did the trick for me and i dint get any error.
Hope this helps you.
Documenting this for others.Check the NLS_DATE_FORMAT parameter value of your database.
SELECT sysdate FROM dual; -- You can see the current format
NLS_DATE_FORMAT specifies the default date format to use with the TO_CHAR and TO_DATE functions. The default value of this parameter is determined by NLS_TERRITORY.
The value of this parameter can be any valid date format mask, and the value must be surrounded by double quotation marks. For example:
NLS_DATE_FORMAT = "MM/DD/YYYY"
From the error , I can guess your format would be 'DD-MM-YYYY', thats why when you tried to convert your date (12-AUG-2013) with (MM-DD-YYYY), you are getting the mentioned error.
Set the NLS_DATE_FORMAT value to 'MM-DD-YYYY' as below and try.
ALTER session SET nls_date_format='MM-DD-YYYY' -
ORA-1858: a non-numeric character was found where a numeric was expected
Hi, I have the Function below to do an insert or update depending on situation but I get an exception each time I run my code can anyone please help me find the error in this??
FUNCTION exceptionlog_insert_update_fn (
v_currentmethod IN VARCHAR,
v_customerrormessage IN VARCHAR,
d_datelogged IN DATE,
v_helplink IN VARCHAR,
v_http_costcenter IN VARCHAR,
v_http_email IN VARCHAR,
v_http_host IN VARCHAR,
v_http_sm_authentic IN VARCHAR,
v_http_sm_authorized IN VARCHAR,
v_http_sm_sdomain IN VARCHAR,
v_http_standardid IN VARCHAR,
v_http_user_agent IN VARCHAR,
v_innerexception IN VARCHAR,
n_logstatus IN NUMBER,
v_exceptionmessage IN VARCHAR,
v_pagepath IN VARCHAR,
v_referrer IN VARCHAR,
v_exceptionsource IN VARCHAR,
v_stacktrace IN VARCHAR,
v_squery IN VARCHAR
RETURN NUMBER
IS
existingexceptionlog NUMBER;
n_rowcount NUMBER;
BEGIN
SELECT exceptionlogid
INTO existingexceptionlog
FROM admin_exceptionlog
WHERE pagepath = v_pagepath
AND exceptionmessage = v_exceptionmessage
AND referrer = v_referrer
AND customerrormessage = v_customerrormessage;
IF existingexceptionlog > 0
THEN
UPDATE admin_exceptionlog
SET occurrences = 1
--datelastmodified = SYSDATE
WHERE exceptionlogid = existingexceptionlog;
n_rowcount := SQL%ROWCOUNT;
IF n_rowcount > 0
THEN
-- An Update occured RETURN O indicating this
RETURN 0;
END IF;
ELSE
----- If It does not already exist in the DB, Do an INSERT
-- RETRIEVE THE ID INFORMATION FIRST
INSERT INTO admin_exceptionlog
(exceptionlogid, currentmethod,
customerrormessage, datelogged, helplink,
http_costcenter, http_email, http_host,
http_sm_authentic, http_sm_authorized,
http_sm_sdomain, http_standardid,
http_user_agent, innerexception, logstatus,
exceptionmessage, pagepath, referrer,
exceptionsource, stacktrace, squery, occurrences,
datelastmodified
VALUES (admin_exceptionlogid_seq.NEXTVAL, v_currentmethod,
v_customerrormessage, d_datelogged, v_helplink,
v_http_costcenter, v_http_email, v_http_host,
v_http_sm_authentic, v_http_sm_authorized,
v_http_sm_sdomain, v_http_standardid,
v_http_user_agent, v_innerexception, n_logstatus,
v_exceptionmessage, v_pagepath, v_referrer,
v_exceptionsource, v_stacktrace, v_squery, 1,
SYSDATE
n_rowcount := SQL%ROWCOUNT;
IF n_rowcount > 0
THEN
-- An Update occured RETURN O indicating this
RETURN 0;
END IF;
END IF;
EXCEPTION
WHEN OTHERS
THEN
RETURN 1;
END exceptionlog_insert_update_fn;I do not know how to use MERGE and did not find much information on it. But I looked into modifying it and once again, it compiles in this case but when I run it using the debugger, no code is inserted into the table at all. And it exits with a row number = 0 at line
RETURN L_rowcount;
Is there something about running procedures on Oracle that I seem to be missing here please??? I went ahead and included information on my table as well.
CREATE OR REPLACE FUNCTION FN_INSERT_UPDATE_EXCEPTIONLOG
V_HELPLINK IN ADMIN_EXCEPTIONLOG.HELPLINK%TYPE,
V_HTTP_EMAIL IN ADMIN_EXCEPTIONLOG.HTTP_EMAIL%TYPE,
V_HTTP_HOST IN ADMIN_EXCEPTIONLOG.HTTP_HOST%TYPE,
V_HTTP_SM_AUTHENTIC IN ADMIN_EXCEPTIONLOG.HTTP_SM_AUTHENTIC%TYPE,
V_HTTP_COSTCENTER IN ADMIN_EXCEPTIONLOG.HTTP_COSTCENTER%TYPE,
V_HTTP_SM_SDOMAIN IN ADMIN_EXCEPTIONLOG.HTTP_SM_SDOMAIN%TYPE,
V_CUSTOMERRORMESSAGE IN ADMIN_EXCEPTIONLOG.CUSTOMERRORMESSAGE%TYPE,
V_CURRENTMETHOD IN ADMIN_EXCEPTIONLOG.CURRENTMETHOD%TYPE,
V_HTTP_SM_AUTHORIZED IN ADMIN_EXCEPTIONLOG.HTTP_SM_AUTHORIZED%TYPE,
V_HTTP_STANDARDID IN ADMIN_EXCEPTIONLOG.HTTP_STANDARDID%TYPE,
V_INNEREXCEPTION IN ADMIN_EXCEPTIONLOG.INNEREXCEPTION%TYPE,
V_EXCEPTIONMESSAGE IN ADMIN_EXCEPTIONLOG.EXCEPTIONMESSAGE%TYPE,
V_LOGSTATUS IN ADMIN_EXCEPTIONLOG.LOGSTATUS%TYPE,
V_PAGEPATH IN ADMIN_EXCEPTIONLOG.PAGEPATH%TYPE,
V_REFERRER IN ADMIN_EXCEPTIONLOG.REFERRER%TYPE,
V_EXCEPTIONSOURCE IN ADMIN_EXCEPTIONLOG.EXCEPTIONSOURCE%TYPE,
V_STACKTRACE IN ADMIN_EXCEPTIONLOG.STACKTRACE%TYPE,
V_TARGETSITE IN ADMIN_EXCEPTIONLOG.TARGETSITE%TYPE,
V_SQUERY IN ADMIN_EXCEPTIONLOG.SQUERY%TYPE
) RETURN NUMBER AS
L_datevariable Date :=Sysdate;
L_exceptionlogid integer :=0;
L_rowcount number;
BEGIN
-- Detect any existing entries with the unique
-- combination of columns as in this constraint:
-- constraint WORKER_T_UK2
-- unique (
-- CUSTOMERRORMESSAGE,
-- LOGSTATUS,
-- PAGEPATH )
begin
select ExceptionLogID
into L_exceptionlogid
from ADMIN_EXCEPTIONLOG AE
where AE.CUSTOMERRORMESSAGE = V_CUSTOMERRORMESSAGE
AND AE.LOGSTATUS = V_LOGSTATUS
AND AE.PAGEPATH = V_PAGEPATH;
exception
when NO_DATA_FOUND then
L_exceptionlogid := 0; -- Is this really needed?
when OTHERS then
raise_application_error(-20003, SQLERRM||
' on select WORKER_T_T'||
' in filename insert_with_plsql_detection_for_update.sql');
end;
-- Conditionally insert the row
if L_exceptionlogid is NULL then
-- Now, let's get the next id sequence
-- we can finally insert a row!
begin
insert into ADMIN_EXCEPTIONLOG (
CURRENTMETHOD,
CUSTOMERRORMESSAGE,
DATELOGGED,
HELPLINK,
HTTP_COSTCENTER,
HTTP_EMAIL,
HTTP_HOST,
HTTP_SM_AUTHENTIC,
HTTP_SM_AUTHORIZED,
HTTP_SM_SDOMAIN,
HTTP_STANDARDID,
INNEREXCEPTION,
LOGSTATUS,
EXCEPTIONMESSAGE,
PAGEPATH,
REFERRER,
EXCEPTIONSOURCE,
STACKTRACE,
TARGETSITE,
SQUERY,
OCCURRENCES)
values (
V_CURRENTMETHOD,
V_CUSTOMERRORMESSAGE,
L_datevariable,
V_HELPLINK,
V_HTTP_COSTCENTER,
V_HTTP_EMAIL,
V_HTTP_HOST,
V_HTTP_SM_AUTHENTIC,
V_HTTP_SM_AUTHORIZED,
V_HTTP_SM_SDOMAIN,
V_HTTP_STANDARDID,
V_INNEREXCEPTION,
V_LOGSTATUS,
V_EXCEPTIONMESSAGE,
V_PAGEPATH,
V_REFERRER,
V_EXCEPTIONSOURCE,
V_STACKTRACE,
V_TARGETSITE,
V_SQUERY, 1
L_rowcount := sql%rowcount;
exception
when OTHERS then
raise_application_error(-20006, SQLERRM||
' on insert WORKER_T'||
' in filename insert_with_plsql_detection_for_update.sql');
end;
else
begin
update ADMIN_EXCEPTIONLOG AE
set AE.DATELOGGED = Sysdate
, AE.OCCURRENCES = AE.OCCURRENCES + 1
where AE.EXCEPTIONLOGID = L_exceptionlogid;
L_rowcount := sql%rowcount;
exception
when OTHERS then
raise_application_error(-20007, SQLERRM||
' on update WORKER_T'||
' in filename insert_with_plsql_detection_for_update.sql');
end;
end if;
RETURN L_rowcount;
END FN_INSERT_UPDATE_EXCEPTIONLOG;
CREATE TABLE "SYSTEM"."ADMIN_EXCEPTIONLOG"
( "EXCEPTIONLOGID" NUMBER NOT NULL ENABLE,
"CURRENTMETHOD" VARCHAR2(400 BYTE),
"CUSTOMERRORMESSAGE" VARCHAR2(4000 BYTE),
"DATELOGGED" DATE,
"HELPLINK" VARCHAR2(4000 BYTE),
"HTTP_COSTCENTER" VARCHAR2(4000 BYTE),
"HTTP_EMAIL" VARCHAR2(4000 BYTE),
"HTTP_HOST" VARCHAR2(4000 BYTE),
"HTTP_SM_AUTHENTIC" VARCHAR2(4000 BYTE),
"HTTP_SM_AUTHORIZED" VARCHAR2(4000 BYTE),
"HTTP_SM_SDOMAIN" VARCHAR2(4000 BYTE),
"HTTP_STANDARDID" VARCHAR2(4000 BYTE),
"INNEREXCEPTION" VARCHAR2(4000 BYTE),
"LOGSTATUS" NUMBER NOT NULL ENABLE,
"EXCEPTIONMESSAGE" VARCHAR2(4000 BYTE),
"PAGEPATH" VARCHAR2(4000 BYTE),
"REFERRER" VARCHAR2(4000 BYTE),
"EXCEPTIONSOURCE" VARCHAR2(4000 BYTE),
"STACKTRACE" VARCHAR2(4000 BYTE),
"TARGETSITE" VARCHAR2(4000 BYTE),
"SQUERY" VARCHAR2(4000 BYTE),
"OCCURRENCES" NUMBER,
CONSTRAINT "ADMIN_EXCEPTIONLOG_PK" PRIMARY KEY ("EXCEPTIONLOGID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSTEM" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSTEM" ;
CREATE OR REPLACE TRIGGER "SYSTEM"."ADMIN_EXCEPTIONLOG_TRG"
BEFORE INSERT ON ADMIN_EXCEPTIONLOG
FOR EACH ROW
BEGIN
SELECT ADMIN_EXCEPTIONLOG_EXCEPTIONLOGID_SEQ.nextVal INTO :new.EXCEPTIONLOGID FROm Dual;
END;
ALTER TRIGGER "SYSTEM"."ADMIN_EXCEPTIONLOG_TRG" ENABLE; -
A non-numeric character was found ... iAS 8 & ora 8.1.6
I have a problem in iAS 8 and Oracle 8.1.6 under windows 2000.
The problem is calling nested packages using plql gateway, I
mean I call one package and it call's another package, this
operation throws " a non-numeric character was found where a
numeric was expected" even if the procedure only has one
parameter, if you call nested procedures there are no errors, I
had the same problem on Solaris, however changed databases and
it dissapear, I thought that the problem was some
NLS_PARAMETERS however now I'm not pretty sure.
Any Ideas.
Thanks in Advance.
Francisco Castaqeda
Arango Software Int.hello
pls use to_date
If your session is set to default date format of DD-MON-YY, execute the following and you will receive the error message:
SQL> select to_date('20-JAN-2010', 'DD-MM-YYYY') from dual;
ERROR:
ORA-01858: a non-numeric character was found where a numeric was expected
no rows selected
When you are converting a string to a date, you have specified that the date is being passed in DD-MM-YYYY format. But you have passed the date in DD-MON-YYYY format. As the month is expected as a number by oracle, but you have passed a character, oracle is unable to translate the string to a number.
Do one of the following:
SQL> select to_date('20-JAN-2010', 'DD-MON-YYYY') from dual
2 /
TO_DATE
20-JAN-2010
OR
SQL> select to_date('20-10-2010', 'DD-MM-YYYY') from dual
2 /
TO_DATE
20-JAN-2010
or you can use alter sessin set nls_date_format='.....................';
regards -
This is my error:
javax.servlet.ServletException: ORA-01858: a non-numeric character was found where a numeric was expected
This is my code:
ResultSet myRs = myStmt.executeQuery("select count(*) dexCount from cs_dexia where userid = '" + vUserid + "'");
int vCount = 0;
while(myRs.next()){
vCount = myRs.getInt("dexCount");
out.println(vCount);
if(vCount > 0)
response.sendRedirect("swapform.jsp");
What have I done wrong?I have changed that and am now getting:
javax.servlet.ServletException: ORA-00904: invalid column name
the query runs in my sql tool no problem, could it be something to do with the alias? -
ORA-01858 error in Application but not in sqlpluss
Hi.
I have this query that runs nicely in sqlpluss and the SQL Commands that came with Expressedition 10g, but when I put it in a report region it produce:
report error:
ORA-01858: a non-numeric character was found where a numeric was expected
query:
SELECT temae.temae, NVL(antall,0) Antall
FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
FROM okeiko
WHERE person = :P3_PERSON and dag >= to_date(DECODE(SIGN(to_char(current_date,'mm')-5),
-1, to_date('01-NOV-'||to_char(current_date,'yy'))-365,
0, to_date('01-MAY-'||to_char(current_date,'yy')),
1, DECODE(SIGN(to_char(current_date,'mm')-10),
-1,to_date('01-MAY-'||to_char(current_date,'yy')),
0,to_date('01-MAY-'||to_char(current_date,'yy')),
1,to_date('01-NOV-'||to_char(current_date,'yy')))),'dd-mon-yy')
GROUP BY temae) p
ON temae.id = p.temae
where antall > 0
ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
Before I added the decode part for the date it looked like this, and worked nice in the application:
SELECT temae.temae, NVL(antall,0) Antall
FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
FROM okeiko
WHERE person = :P3_PERSON and dag > to_date('30-apr-06','dd-mon-yy')
GROUP BY temae) p
ON temae.id = p.temae
where antall > 0
ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
This is the data structure
SQL> describe temae
Name Null? Type
ID NOT NULL NUMBER
TEMAE VARCHAR2(20)
TYPE NUMBER
Then it worked nicely in the application to.
SQL> describe okeiko;
Name Null? Type
ID NOT NULL NUMBER
PERSON NOT NULL NUMBER
TEMAE NOT NULL NUMBER
SENSEI NUMBER
REMARK VARCHAR2(4000)
DAG NOT NULL DATE
Can anyone se why application is complaining?
BTW report region also complains to_date('01-may-06','dd-mon-yy') does not have a valid month.Marius,
I am not sure but try this:
SELECT temae.temae, NVL (antall, 0) antall
FROM temae LEFT OUTER JOIN (SELECT temae, COUNT (temae) AS antall
FROM okeiko
WHERE person = :p3_person
AND dag >=
TO_DATE
(DECODE
(SIGN
( TO_CHAR
(CURRENT_DATE,
'mm'
- 5
-1, TO_DATE
( '01-NOV-'
|| TO_CHAR
(CURRENT_DATE,
'yy'
- 365,
0, TO_DATE
( '01-MAY-'
|| TO_CHAR
(CURRENT_DATE,
'yy'
1, DECODE
(SIGN
( TO_CHAR
(CURRENT_DATE,
'mm'
- 10
-1, TO_DATE
( '01-MAY-'
|| TO_CHAR
(CURRENT_DATE,
'yy'
0, TO_DATE
( '01-MAY-'
|| TO_CHAR
(CURRENT_DATE,
'yy'
1, TO_DATE
( '01-NOV-'
|| TO_CHAR
(CURRENT_DATE,
'yy'
GROUP BY temae) p ON temae.ID = p.temae
WHERE antall > 0
ORDER BY NVL (antall, 0) DESC, temae.TYPE, temae.temaeI took out the formating of your to_date function.
Denes Kubicek -
Oracle error - ociexecute(): OCIStmtExecute: ORA-01858
Using PHP 4.3.11 on Linux and ADODB data abstraction library.
Oracle client version is 10.1.
Can sucessfully connect to remote database (version 9.2.0.6 NLS_LANG AL32UTF8).
When doing a simple select from a view:
select RTS_LOAD from VW_R_PROJECTED_LOAD_OUTPUT
I get the error message:
ociexecute(): OCIStmtExecute: ORA-01858: a non-numeric character was found where a numeric was expected in /opt/devftp/var/www/php/adodb/461/drivers/adodb-oci8.inc.php on line 942
1858: ORA-01858: a non-numeric character was found where a numeric was expected
If in my PHP script I directly query the underlying table that this Oracle view is based on, I have no problem.
Using SQLPlus on the web server I don't have any problems at all selecting from the view, it is definitely a valid view.
Any clues? If so please email as well as posting response here.
Geoff
[email protected]Hi !
I think Your view has to_date function in its definition, and this to_date is called without second parameter: date format. Probably NLS_DATE_FORMAT is set to different values in SQL*Plus and PHP environment. You can check it out by running
select * from v$nls_parameters;
in SQL*Plus and in PHP.
If there are two different values You should modify view to use to_date in form: to_date(some_date_string, poroper_date_format)
Regards,
Pawel -
National Language Support and Error ORA-01858
Hi,
I have a problem using NLS.
When I use NLS for Italian,I become the error ORA-01858 -->
"a non-numeric character was found where a numeric was
expected".
But with the same query I use for NLS_Italian,it works with
NLS_German and NLS_English.
I use this date-formats "DD.Month YYYY" , "DD.MM.YYYY", "DD.MM"
For example:
Select to_char(sd.Datum,'DD.Month YYYY') Datum ,
sd.FONDSVERMOEGEN, sd.AKTIEN, sd.KASSE, sd.RENTEN,sd.FUTURES,
sd.WERTPAPIERE, sd.IMMOBILIEN,
sd.KUPON, sd.DURCHSCHNITT_RENDITE, sd.DURCHSCHNITT_RL from
Strukturdaten sd,fondsdaten_allgemein fd
where sd.match=fd.match and sd.match=amfcomm .
Can somebody help me??Can you tell us what the value of sd.Datum is in the queries?
-
Nationnal Language Support and Error ORA-01858
Hi,
I have a problem using NLS.
When I use NLS for Italian,I become the error ORA-01858 -->
"a non-numeric character was found where a numeric was expected".
But with the same query I use for NLS_Italian,it works with
NLS_German and NLS_English.
I use this date-formats "DD.Month YYYY" , "DD.MM.YYYY", "DD.MM"
For example:
Select to_char(sd.Datum,'DD.Month YYYY') Datum ,
sd.FONDSVERMOEGEN, sd.AKTIEN, sd.KASSE, sd.RENTEN,sd.FUTURES,
sd.WERTPAPIERE, sd.IMMOBILIEN,
sd.KUPON, sd.DURCHSCHNITT_RENDITE, sd.DURCHSCHNITT_RL from
Strukturdaten sd,fondsdaten_allgemein fd
where sd.match=fd.match and sd.match=amfcomm .
Can somebody help me??Can you tell us what the value of sd.Datum is in the queries?
Maybe you are looking for
-
Ipod touch shows up as camera?
When I connect my ipod touch to the computer it shows up as a camera. I have read others answers which said to update the driver. I tried doing this but it keeps saying 'The specified location does not contain information about your hardware'. How do
-
How to select the last elements in a string
Hi Guys I am using UART RS232 protocol and i need to calculate the check sum. My data came in decimal and in the end it must be doubles to manipulate it. So my problem is, for example, the sum of all elemants is in decimal 1742 and in hex is 6CE and
-
Table control and a selection screen
Hi, I have a requirement where I am supposed to be designing a screen that has a table control with fields w/selection column label 1(non-editable) i/o field(from) i/o field(to) w/selection column label 2(non-editable)
-
Why doesn't my website work in IE?
Hi i'v designed a website in photoshop then brought it into dreamweaver threw slicing it up, then made it live, although the website only seems to work properly in safari and google chrome, not in IE and Firefox. the website is called: www.michaelwil
-
Compiling datas from different sheets automatically
Hhello all, here is my problem: -I created a file with several spreadsheets, one per year. -In each spreadsheet I have 12 tables, one per month, each containing the rows for each day. -Everyday I collect information (gas consumption) to put in the ta