Non-numeric Character Found Where Numeric Was Expected?
Jun 1, 2007
I get the error message mentioned in the subject with this SELECT-statement
....where (t.cfonte=14 and t.data_ultima_modifica between sysdate -4000/(24*60*60) and sysdate ) or (t.data_ultima_modifica > to_date('%TIMESTAMP%','ddmmyyhh24miss'))]]>
If I substitute %TIMESTAMP% with 310507143709 then it works
View 6 Replies
ADVERTISEMENT
Oct 10, 2011
I have an sqlldr process running loading data into my database. I have created a trigger to run before inserts on each row to start gathering summary data from the basic underlying data. The trigger compiles ok and the procedures the trigger is calling compile ok, but when the sqlldr process runs I get errors in the log files.
Here is the sqlldr control file:
LOAD data
APPEND INTO TABLE cdr.day_tables
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
RecordCode
,CdrStart DATE 'YYYY DDD SSSSS'
[code].......,
Next is my trigger
create or replace TRIGGER BNUMBER_SUMMARY_INS
BEFORE INSERT ON DAY_TABLES
FOR EACH ROW
DECLARE
[code]......
Next are the procedures that are called by the trigger:
create or replace PROCEDURE BNUMBER_SUMMARY
( BNUMBER IN VARCHAR2
, CALLDATE IN DATE
, CALLDURATION IN NUMBER
) AS
record_found NUMBER;
BEGIN
[code].......
The error messages I am getting are:
Record 1: Rejected - Error on table CDR.DAY_TABLES, column CDREND.
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "CDR.BNUMBER_SUMMARY_INS", line 6
ORA-04088: error during execution of trigger 'CDR.BNUMBER_SUMMARY_INS'
I need to find out what field it is complaining about, especially since I am not even using the cdrend field from the input record?
View 14 Replies
View Related
Apr 22, 2013
select ORDER_NUMBER from OE_ORDER_HEADERS_ALL
WHERE ordered_date=to_char(to_date(substr(ORDERED_DATE,1,10),'YYYY/MM/DD'),'DD-MON-YYYY');
Error:-ORA-01858: a non-numeric character was found where a numeric was expected
View 13 Replies
View Related
Dec 7, 2010
We are getting an error : a non numeric was found where a numeric was expected sometimes when this statement is executed:
INSERT INTO training select * from temp_training where class_id='xyz';
all columns and their datatypes are the same in both the tables
however if i replace the * with the column names as shown below it seems to work fine without giving an error
insert into training (a,b,c) select a,b,c from temp_training where class_id='xyz'
wanted to understand the subtle difference between the 2 statements
View 5 Replies
View Related
Feb 8, 2011
How can I find the last numeric value in the alphanumeric string?
Example:
LS14160220SPAD show me 0
MN23160224N show me 4
SP34524442 show me 2
View 9 Replies
View Related
Dec 4, 2004
is there in pl/sql a function to check wether a digit is numeric or character like we have in c 'is_numeric() ' or is_digit() functions�
View 6 Replies
View Related
May 24, 2011
when I want to create a table.When I run my procedure I received :
PL/SQL: numeric or value error: character string buffer too small
create or replace PROCEDURE p_create_tmp_tables (p_result OUT NUMBER ) IS
string_sql varchar2(1000);
result NUMBER;
BEGIN
string_sql := 'CREATE TABLE TMP_CATEGORIES (CODE_CATEGORY NUMBER(6,0), NAME_CATEGORY VARCHAR2(25 BYTE))';
execute immediate string_sql;
[code]...
View 10 Replies
View Related
Aug 4, 2011
I got a string in the form 1+2+4.If we write select 1+2+4 from dual;then we get o/p as 7.but the same thing iam trying to do in a bit of pl/sql program by passing the string 1+2+4 value to a number variable as below.
COUNT_TASK := TO_NUMBER(TASK6_STATUS);
TASK6_STATUS value is 1+2+4 (this thing i got by replacing the string and lots of stuff) but i need the result after adding these 3 numbers in the string. and i declare COUNT_TASK as NUMBER;and i am very well aware that it gives me the error ORA-06502: PL/SQL: numeric or value error: character to number conversion error
how to add these numbers in my program to get the result 7.
View 6 Replies
View Related
May 6, 2008
I am trying to execute this
begin
-- Initialize owa with an empty array, just so we can use htp.
owa.init_cgi_env( param_val=>owa.cgi_var_name );
-- Add a header to avoid dealing with header-related code in htp.
htp.prn('Content-Type:text/plain');
htp.print('');
[code]....
The error I am getting is
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.HTP", line 1550
ORA-06512: at line 32
what i feel is that oracle Database UTF8 or AL32UTF8 characterset does not support htp package properly. When i run the code on another characterset, it runs errorfree except in UTF8 or AL32UTF8.
View 7 Replies
View Related
Jun 20, 2013
1 error has occurred ORA-06502: PL/SQL: numeric or value error: character to number conversion error
I get the above error when I try to compare the below dates in a Pl/sql process in APEX environment.
Is there a work around for it? or (to_char(V_SERVFROM,'mm/dd/yyyy')) != (to_char(:P29_SERVFROM,'mm/dd/yyyy'))
View 4 Replies
View Related
Jul 14, 2011
i am getting above error while doing
ORA-06502 numeric or value error: character string buffer too small
ORA-06512 itw_item_add_ch at line 17
CREATE OR REPLACE procedure itw_item_add_ch (header_id1 number, folio out varchar2,tariff out varchar2) as
cursor item_add(header_id1 number) is
SELECT
DISTINCT c.attribute4 item_tariff_no,
c.attribute5 item_folio
FROM OE_ORDER_LINES_ALL b,
[code].....
View 11 Replies
View Related
Jul 10, 2012
Following are my declarations and query inside my procedure.i am getting "ORA-06502: PL/SQL: numeric or value error: character string buffer too smal" error when i try to execute the procedure
code :
request_owner request.SCC_USER_ID%TYPE := NULL;
receipt_location request.RECEIPT_LOCATION_LKP_ID%TYPE := NULL;
receipt_type request.RECEIPT_TYPE_LKP_ID%TYPE := NULL;
item_id request.ITEM_ID%TYPE := NULL;
[code]...
View 3 Replies
View Related
Jan 24, 2011
I am learning pl/sql and this is procedure i had created which got created successfully.then i created two variables name v_name, v_loc with command.
variable v_name varchar2; etc.
and executed procedure like
execute dept_proc2(10, :v_name, :v_loc);
and i am getting the error
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
1 create or replace procedure dept_proc2
2 (v_dno in number, v_name out varchar2, v_loc out varchar2)
3 is
4 cursor dept_cur is select dname, loc from dept
5 where deptno=v_dno;
[code]...
View 12 Replies
View Related
Oct 8, 2012
Actually I have an existing table in LOG RAW instead of BLOB. Which stores some transaction XML data. The data is very huge. When i trying with the following, gives me following error
SQL> declare
2 a varchar(255);
3 B LONG RAW;
4 cursor c1 is select xml FROM LOG_tab WHERE ID='13148' ;
5 begin
6 open c1;
7 loop
8 fetch c1 into b ;
[code]....
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 10
Since dbms_output.put_line has buffer limitation.Can we write the result of a select statement into client LOCAL disk files using PL/SQL.
View 1 Replies
View Related
Jun 7, 2012
I am getting an error as below
ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
Here is complete code
CREATE OR REPLACE
TYPE MDI.ACCUM_STRING_TYPE2 AS OBJECT (
rvalue VARCHAR2 (32767
STATIC FUNCTION odciaggregateinitialize (sctx IN OUT accum_string_type2)
RETURN NUMBER
[code]...
View 4 Replies
View Related
Feb 17, 2012
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
I am reexecuting this view:
set serveroutput on buffer 2560000
;
CREATE OR REPLACE VIEW VIEW_TRIP_ASSIGNMENTS
(COMPANY_ID, TRIP_ID, TRIP_STOP_ID, TRIP_CODE, TRIP_NAME,
TRIP_DESC, TRIP_NUMBER, TRIP_START_TIME, TRIP_END_TIME, TRIP_LOADING_TIME,
TRIP_UNLOADING_TIME, FREQUENCY_ID, FREQUENCY_CODE, FREQUENCY_NAME, FREQUENCY_DESC,
FREQUENCY_CODE_NUMBER, CUSTOMER_ID, CUSTOMER_NUMBER, CUSTOMER_NAME, CUSTOMER_DESCRIPTION,
CUSTOMER_TYPE_ID, CUSTOMER_TYPE_NAME, CUSTOMER_TYPE_CODE, DAY_PHONE_NUMBER, EMAIL_ADDRESS,
CONTRACT_ID, CONTRACT_NUMBER, CONTRACT_DESCRIPTION, WORK_LOCATION_ID, ROUTE_ID,
[code]....
before reexecuting above view I was counting the column and was getting below error:
ora-00600 internal error code,arguments:[qctopn1], [],[],[]...
View 14 Replies
View Related
Oct 2, 2010
i am generating html format mail from oracle 10g database.
For displaying data into html format, message body data is exceeding more than 32k.
ORA-06502: PL/SQL: numeric or value error:character string buffer too small
i am using long data type for message body data.
View 4 Replies
View Related
Mar 28, 2013
Trying to learn and understand Triggers, PL/SQL code, etc. When I execute a simple insert using Toad for Oracle, all is fine. When I try the identical insert in SQL*Plus, it throws error ORA-06502 during execution of the trigger.
Here is the error info:
insert into AAAJOB(PROCEDURENAME,DESCRIPTION) VALUES('OOO','PPP')
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "PMSC0.AAAJOB_TIMING", line 10
ORA-04088: error during execution of trigger 'PMSC0.AAAJOB_TIMING'
===
Here is the table and the trigger:
CREATE TABLE PMSC0.AAAJOB
(
CREATETS TIMESTAMP(0) DEFAULT current_timestamp,
PROCEDURENAME VARCHAR2(100 CHAR),
DESCRIPTION VARCHAR2(100 CHAR),
LASTUPDATEDBY VARCHAR2(9 CHAR)
)
[code]....
The error seems to be on this:
SELECT current_timestamp
INTO :new_row.createTS
View 5 Replies
View Related
Nov 11, 2010
I am having some difficulties with this trigger. It keeps giving me the error "ERROR at line 5: PL/SQL: ORA-00923: FROM keyword not found where expected" when I am not even using a SELECT before the line it says the error is on? Here is the trigger that I am attempting to create.
CREATE OR REPLACE TRIGGER ClassRestraint
BEFORE INSERT ON Enrolled
FOR EACH ROW
DECLARE
numCourses NUMBER :=0;
myException EXCEPTION;
BEGIN
[code]...
I am getting the error on line 5.
View 5 Replies
View Related
Jun 23, 2011
I have this script which should find tablespaces and their size, joined with free bytes. Trying to run this gives me the SQL Error: ORA-00923: FROM keyword not found where expected.
I have two questions:
1. Where should the FROM be?
2. Is there something wrong with the join.
==============================================
set linesize 120
col "TOTAL (KB)" format 99999999999999999
col "FREE (KB)" format 9999999999999999
col TSNAME format a35
col "% FREE" format a10;
SELECT a.tablespace_name TSNAME, sum(a.bytes/1024) "TOTAL (KB)",
Sum(b.bytes/1024) "FREE (KB)"
To_char(round((sum(a.bytes/1024)/sum(a.bytes/1024))*100),2), 'FM99990D999999')
|| ' % ' "% FREE"
FROM dba_data_files a, dba_free_space b
Where a.tablespace_name = b.tablespacename
Group by a. tablespace_name
[/i]
=============================================
I used the script from [URL]
It worked great but I'm not sure how to use the arithmetic functions to show me MB instead of bytes.
View 1 Replies
View Related
Jun 29, 2007
The following syntax gives me the error:
ORA-00923: FROM key word not found where expected
if this is so, why use 'from' in TRIM function? Or is my syntax incorrect?
SYNTAX: select trim leading ('0' from (substr(to_char(polref_nbr),9,10))) "TRIM example" from tbl_vg_adhoc;
View 2 Replies
View Related
Aug 29, 2012
I am trying to compile this block for updating a record. In the P_ADD_LOV_SQL column, I have to update the following select statment, but when ever I am compiling it it shows error in the Select statement as : ORA-00923: FROM keyword not found where expected. rearrange the select statement so that it doesn't show the error.The coding is :
DECLARE
P_ADD_KEY NUMBER;
P_ADD_CODE VARCHAR2(50);
P_ADD_DESCRIPTION VARCHAR2(75);
P_ADD_MODULE_KEY NUMBER;
P_ADD_PROMPT VARCHAR2(50);
P_ADD_REQUIRED VARCHAR2(1);
P_ADD_FORMAT VARCHAR2(1);
P_ADD_SIZE NUMBER;
[code]....
The column is updated properly. But I can't update by compiling the block.
View 11 Replies
View Related
May 17, 2013
I want to get the top 10% of salaries in employees table. But I got error:
SQL> select top 10 percent salary
2 from employees
3 order by salary desc;
ORA-00923: FROM keyword not found where expected How can I get the top 10% percent?
View 6 Replies
View Related
Jun 20, 2011
I have set NLS_NUMERIC_CHARACTERS to ',.' but somehow during my java application life-cycle it got changed to '.,'! Is there any way to find what causes this? I can't find what or who change it. I have ordinary Java app which connects to Oracle 11.2.0.1.0 DB and as far as I know NLS_NUMERIC_CHARACTERS is not set explicitly or any other NLS_XXX setting. Is there any way to look in some logs for this?
View 1 Replies
View Related
Jul 29, 2011
I have a requirement in which I have to append LOBs and I have to insert the LOB into a table column. I am facing problem when the data exceeds certain limit. (please note that my program logic is given below, not the exact program)
DECLARE
final_html CLOB;
int_html CLOB;
v_str VARCHAR2(32767);
i number:=0;
BEGIN
dbms_lob.createtemporary(lob_loc => int_html, CACHE => TRUE, dur => dbms_lob.CALL);
dbms_lob.createtemporary(lob_loc => final_html, CACHE => TRUE, dur => dbms_lob.CALL);
DBMS_LOB.OPEN(int_html, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.OPEN(final_html, DBMS_LOB.LOB_READWRITE);
dbms_output.ENABLE(1000000);
[code]....
when the looping is done for lesser value say for e.g FOR i IN 1..10 loop, the program works fine, but when the looping is done for more values I am getting "-6502-ORA-06502: PL/SQL: numeric or value error" error message.
View 1 Replies
View Related
Dec 18, 2012
create or replace package pckname is
Procedure VALIDATE_USER(p out credentials.pc%TYPE,
u in credentials.uc%TYPE,
c in credentials.sc%TYPE);
end pckname;
I m getting error at line 1 and line 8:
View 1 Replies
View Related
Jan 30, 2013
I currently have a table with a VARCHAR column which is used to store notes. Currently the notes read something like 'Verified 01/01/2012'. I am trying to convert it to a date column so I can run reports using the date (select between dates etc).
I have tried with the substr function but since the records are all different doesn't really work. (plus that doesn't make it a date so not sure it would work for searching).
how to proceed?
View 3 Replies
View Related
Jun 13, 2011
I am using APEX 4.0.2.00.06 on a Linux server running Oracle 11g R2 and have the following problem:
I have a page with two forms for creation of new rows in either the sites table or the site-projects table. Site-projects is defined as follows with four numbers and two character fields:
Site_id number(10,0) PK1
Cruise_id number(10,0) PK2
Sequence_number number(10,0) PK3
Project_id number(10,0)
Assigned_flag varchar2(1) default �N�
Planned-site_flag varchar2(1) default �N�
The entry form uses select lists for many of the fields, but it is the assigned_flag that seems to be causing problems. It�s LOV definition is static2:UNASSIGNED;N,ASSIGNED;Y
When I tap the create button, I get :
ORA-20507: Invalid numeric value N for column ASSIGNED_FLAG Error Unable to process row of table SITES.
This suggests that something is going on at the sites table even though I use the create button associated with the site-projects table. Am I invoking the row processing for the sites table as well? Why does it run into invalid number when the field is varchar2? Actually, I get the exact same error if I use the create button on the sites portion of the page.
The site table has the following columns:
Site_id number(10,0) PK1
Parent_site_id number(10,0) nullable
Stratum_id number(10,0)
Area_id number(10,0)
Site_type_id number(10,0)
Name varchar2(50)
View 2 Replies
View Related
Jul 25, 2005
I have an issue in oracle form 6i. I want to create an input box that accepts only number. As the user press any key other than allowed for numbers it should not accept.
View 4 Replies
View Related
Oct 8, 2012
I currently have a field which stores a date (date employer started with the company). I want to create a view which stores this as number of days employed (e.g. if star date 1st October view will say 8). How to convert a date to a number?
View 14 Replies
View Related